Remove removal tests

This commit is contained in:
Bob Mottram 2016-10-11 13:56:02 +01:00
parent 63ce7511ad
commit fe35c30d91
23 changed files with 0 additions and 96 deletions

View File

@ -69,10 +69,6 @@ function restore_remote_babel {
}
function remove_babel {
if [[ $(app_is_installed babel) == "0" ]]; then
return
fi
${PROJECT_NAME}-mesh-install -f babel --remove yes
if [ ! "$?" = "0" ]; then
echo $'Failed to remove babel'

View File

@ -83,10 +83,6 @@ function restore_remote_batman {
}
function remove_batman {
if [[ $(app_is_installed batman) == "0" ]]; then
return
fi
${PROJECT_NAME}-mesh-install -f batman --remove yes
if [ ! "$?" = "0" ]; then
echo $'Failed to remove batman'

View File

@ -330,9 +330,6 @@ function restore_remote_blog {
}
function remove_blog {
if [[ $(app_is_installed blog) == "0" ]]; then
return
fi
if [ ${#FULLBLOG_DOMAIN_NAME} -eq 0 ]; then
return
fi

View File

@ -182,9 +182,6 @@ function restore_remote_cjdns {
}
function remove_cjdns {
if [[ $(app_is_installed cjdns) == "0" ]]; then
return
fi
service cjdns stop
ip6tables -D nat -D POSTROUTING -o tun0 -j MASQUERADE
ip6tables -D FORWARD -i tun0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT

View File

@ -155,9 +155,6 @@ function restore_remote_dlna {
}
function remove_dlna {
if [[ $(app_is_installed dlna) == "0" ]]; then
return
fi
service minidlna stop
apt-get -y remove --purge minidlna
if [ -f /etc/minidlna.conf ]; then

View File

@ -98,9 +98,6 @@ function restore_remote_emacs {
}
function remove_emacs {
if [[ $(app_is_installed emacs) == "0" ]]; then
return
fi
apt-get -y remove --purge emacs24
update-alternatives --set editor /usr/bin/nano
sed -i '/install_emacs/d' $COMPLETION_FILE

View File

@ -348,9 +348,6 @@ function restore_remote_gnusocial {
}
function remove_gnusocial {
if [[ $(app_is_installed gnusocial) == "0" ]]; then
return
fi
if [ ${#MICROBLOG_DOMAIN_NAME} -eq 0 ]; then
return
fi

View File

@ -377,10 +377,6 @@ function restore_remote_gogs {
}
function remove_gogs {
if [[ $(app_is_installed gogs) == "0" ]]; then
return
fi
if [ ${#GIT_DOMAIN_NAME} -eq 0 ]; then
return
fi

View File

@ -317,9 +317,6 @@ function restore_remote_hubzilla {
}
function remove_hubzilla {
if [[ $(app_is_installed hubzilla) == "0" ]]; then
return
fi
if [ ${#HUBZILLA_DOMAIN_NAME} -eq 0 ]; then
return
fi

View File

@ -157,9 +157,6 @@ function restore_remote_ipfs {
}
function remove_ipfs_go {
if [[ $(app_is_installed ipfs_go) == "0" ]]; then
return
fi
systemctl stop ipfs
systemctl disable ipfs
systemctl daemon-reload
@ -174,9 +171,6 @@ function remove_ipfs_go {
}
function remove_ipfs_js {
if [[ $(app_is_installed ipfs_js) == "0" ]]; then
return
fi
systemctl stop ipfs
systemctl disable ipfs
rm /etc/systemd/system/ipfs.service

View File

@ -234,9 +234,6 @@ function restore_remote_irc {
}
function remove_irc {
if [[ $(app_is_installed irc) == "0" ]]; then
return
fi
remove_watchdog_daemon ngircd
systemctl stop ngircd
apt-get -y remove --purge ngircd

View File

@ -107,9 +107,6 @@ function restore_remote_librevault {
}
function remove_librevault {
if [[ $(app_is_installed librevault) == "0" ]]; then
return
fi
iptables -D INPUT -p udp --dport $LIBREVAULT_PORT -j ACCEPT
iptables -D INPUT -p tcp --dport $LIBREVAULT_PORT -j ACCEPT
function_check save_firewall_settings

View File

@ -152,9 +152,6 @@ function restore_remote_mumble {
}
function remove_mumble {
if [[ $(app_is_installed mumble) == "0" ]]; then
return
fi
apt-get -y remove --purge mumble-server
if [[ $ONION_ONLY == "no" ]]; then
iptables -D INPUT -p udp --dport $MUMBLE_PORT -j ACCEPT

View File

@ -244,9 +244,6 @@ function restore_remote_rss {
}
function remove_rss {
if [[ $(app_is_installed rss) == "0" ]]; then
return
fi
if [ ${#RSS_READER_DOMAIN_NAME} -eq 0 ]; then
return
fi

View File

@ -96,9 +96,6 @@ function restore_remote_searx {
}
function remove_searx {
if [[ $(app_is_installed searx) == "0" ]]; then
return
fi
systemctl stop searx
systemctl disable searx
rm /etc/systemd/system/searx.service

View File

@ -155,10 +155,6 @@ function restore_remote_sip {
}
function remove_sip {
if [[ $(app_is_installed sip) == "0" ]]; then
return
fi
iptables -D INPUT -p udp --dport $TURN_PORT -j ACCEPT
iptables -D INPUT -p tcp --dport $TURN_PORT -j ACCEPT
iptables -D INPUT -p tcp --dport $TURN_TLS_PORT -j ACCEPT

View File

@ -460,9 +460,6 @@ function restore_remote_syncthing {
}
function remove_syncthing {
if ! grep -Fxq "install_syncthing" $COMPLETION_FILE; then
return
fi
iptables -D INPUT -p udp --dport $SYNCTHING_PORT -j ACCEPT
iptables -D INPUT -p tcp --dport $SYNCTHING_PORT -j ACCEPT
function_check save_firewall_settings

View File

@ -183,9 +183,6 @@ function restore_remote_tahoelafs {
}
function remove_tahoelafs {
if [[ $(app_is_installed tahoelafs) == "0" ]]; then
return
fi
iptables -D INPUT -p udp --dport $TAHOELAFS_PORT -j ACCEPT
iptables -D INPUT -p tcp --dport $TAHOELAFS_PORT -j ACCEPT
function_check save_firewall_settings

View File

@ -224,10 +224,6 @@ function restore_remote_tox {
}
function remove_tox_node {
if [[ $(app_is_installed tox_node) == "0" ]]; then
return
fi
iptables -D INPUT -p tcp --dport $TOX_PORT -j ACCEPT
iptables -D INPUT -p udp --dport $TOX_PORT -j ACCEPT
function_check save_firewall_settings
@ -246,9 +242,6 @@ function remove_tox_node {
}
function remove_tox_avahi {
if [[ $(app_is_installed tox_avahi) == "0" ]]; then
return
fi
cd $INSTALL_DIR/toxid
make uninstall
rm -rf $INSTALL_DIR/toxid
@ -256,10 +249,6 @@ function remove_tox_avahi {
}
function remove_tox_client {
if [[ $(app_is_installed tox_client) == "0" ]]; then
return
fi
${PROJECT_NAME}-mesh-install -f tox_client --remove yes
if [ ! "$?" = "0" ]; then
echo $'Could not remove Tox client'

View File

@ -123,9 +123,6 @@ function restore_remote_webmail {
}
function remove_webmail {
if [[ $(app_is_installed webmail) == "0" ]]; then
return
fi
nginx_dissite webmail
if [ -f /etc/nginx/sites-available/webmail ]; then
rm /etc/nginx/sites-available/webmail

View File

@ -210,9 +210,6 @@ function restore_remote_wiki {
}
function remove_wiki {
if [[ $(app_is_installed wiki) == "0" ]]; then
return
fi
if [ ${#WIKI_DOMAIN_NAME} -eq 0 ]; then
return
fi

View File

@ -261,18 +261,12 @@ function configure_firewall_for_xmpp {
}
function remove_xmpp_client {
if [[ $(app_is_installed xmpp_client) == "0" ]]; then
return
fi
apt-get -y remove --purge profanity
sed '/install_xmpp_client/d' $COMPLETION_FILE
}
function remove_xmpp {
remove_xmpp_client
if [[ $(app_is_installed xmpp) == "0" ]]; then
return
fi
iptables -D INPUT -p tcp --dport 5222:5223 -j ACCEPT
iptables -D INPUT -p tcp --dport 5269 -j ACCEPT
iptables -D INPUT -p tcp --dport 5280:5281 -j ACCEPT

View File

@ -97,9 +97,6 @@ function restore_remote_zeronet {
}
function remove_zeronet_blog {
if [[ $(app_is_installed zeronet_blog) == "0" ]]; then
return
fi
if [ -d $MESH_INSTALL_DIR/zeronet/ZeroBlog ]; then
rm -rf $MESH_INSTALL_DIR/zeronet/ZeroBlog
fi
@ -108,9 +105,6 @@ function remove_zeronet_blog {
}
function remove_zeronet_mail {
if [[ $(app_is_installed zeronet_mail) == "0" ]]; then
return
fi
if [ -d $MESH_INSTALL_DIR/zeronet/ZeroMail ]; then
rm -rf $MESH_INSTALL_DIR/zeronet/ZeroMail
fi
@ -119,9 +113,6 @@ function remove_zeronet_mail {
}
function remove_zeronet_forum {
if [[ $(app_is_installed zeronet_forum) == "0" ]]; then
return
fi
if [ -d $MESH_INSTALL_DIR/zeronet/ZeroTalk ]; then
rm -rf $MESH_INSTALL_DIR/zeronet/ZeroTalk
fi
@ -133,9 +124,6 @@ function remove_zeronet {
remove_zeronet_blog
remove_zeronet_mail
remove_zeronet_forum
if [[ $(app_is_installed zeronet) == "0" ]]; then
return
fi
iptables -D INPUT -i $WIFI_INTERFACE -p udp --dport $ZERONET_PORT -j ACCEPT
iptables -D INPUT -i $WIFI_INTERFACE -p tcp --dport $ZERONET_PORT -j ACCEPT
iptables -D INPUT -i $WIFI_INTERFACE -p udp --dport $TRACKER_PORT -j ACCEPT