This commit is contained in:
Bob Mottram 2016-09-30 19:34:01 +01:00
parent 7a9678a785
commit 3d1e580c45
22 changed files with 30 additions and 32 deletions

View File

@ -66,7 +66,7 @@ function restore_remote_babel {
}
function remove_babel {
if ! grep -Fxq "install_babel" $COMPLETION_FILE; then
if [[ $(app_is_installed babel) == "0" ]]; then
return
fi

View File

@ -79,7 +79,7 @@ function restore_remote_batman {
}
function remove_batman {
if ! grep -Fxq "install_batman" $COMPLETION_FILE; then
if [[ $(app_is_installed batman) == "0" ]]; then
return
fi

View File

@ -311,7 +311,7 @@ function restore_remote_blog {
}
function remove_blog {
if ! grep -Fxq "install_blog" $COMPLETION_FILE; then
if [[ $(app_is_installed blog) == "0" ]]; then
return
fi
if [ ! -d /var/www/$FULLBLOG_DOMAIN_NAME ]; then

View File

@ -171,7 +171,7 @@ function restore_remote_cjdns {
}
function remove_cjdns {
if ! grep -Fxq "install_cjdns" $COMPLETION_FILE; then
if [[ $(app_is_installed cjdns) == "0" ]]; then
return
fi
service cjdns stop

View File

@ -149,7 +149,7 @@ function restore_remote_dlna {
}
function remove_dlna {
if ! grep -Fxq "install_dlna" $COMPLETION_FILE; then
if [[ $(app_is_installed dlna) == "0" ]]; then
return
fi
service minidlna stop

View File

@ -99,7 +99,7 @@ function restore_remote_emacs {
}
function remove_emacs {
if ! grep -Fxq "install_emacs" $COMPLETION_FILE; then
if [[ $(app_is_installed emacs) == "0" ]]; then
return
fi
apt-get -y remove --purge emacs24

View File

@ -337,7 +337,7 @@ function restore_remote_gnusocial {
}
function remove_gnusocial {
if ! grep -Fxq "install_gnusocial" $COMPLETION_FILE; then
if [[ $(app_is_installed gnusocial) == "0" ]]; then
return
fi
nginx_dissite $MICROBLOG_DOMAIN_NAME

View File

@ -396,7 +396,7 @@ function restore_remote_gogs {
}
function remove_gogs {
if ! grep -Fxq "install_gogs" $COMPLETION_FILE; then
if [[ $(app_is_installed gogs) == "0" ]]; then
return
fi

View File

@ -354,7 +354,7 @@ function restore_remote_hubzilla {
}
function remove_hubzilla {
if ! grep -Fxq "Hubzilla domain" $COMPLETION_FILE; then
if [[ $(app_is_installed hubzilla) == "0" ]]; then
return
fi
echo $'Removing Hubzilla'

View File

@ -151,7 +151,7 @@ function restore_remote_ipfs {
}
function remove_ipfs_go {
if ! grep -Fxq "install_ipfs_go" $COMPLETION_FILE; then
if [[ $(app_is_installed ipfs_go) == "0" ]]; then
return
fi
systemctl stop ipfs
@ -168,7 +168,7 @@ function remove_ipfs_go {
}
function remove_ipfs_js {
if ! grep -Fxq "install_ipfs_js" $COMPLETION_FILE; then
if [[ $(app_is_installed ipfs_js) == "0" ]]; then
return
fi
systemctl stop ipfs

View File

@ -141,7 +141,7 @@ function restore_remote_irc {
}
function remove_irc {
if ! grep -Fxq "install_irc" $COMPLETION_FILE; then
if [[ $(app_is_installed irc) == "0" ]]; then
return
fi
systemctl stop ngircd

View File

@ -104,7 +104,7 @@ function restore_remote_librevault {
}
function remove_librevault {
if ! grep -Fxq "install_librevault" $COMPLETION_FILE; then
if [[ $(app_is_installed librevault) == "0" ]]; then
return
fi
iptables -D INPUT -p udp --dport $LIBREVAULT_PORT -j ACCEPT

View File

@ -145,10 +145,8 @@ function restore_remote_mumble {
}
function remove_mumble {
if !grep -Fxq "install_mumble" $COMPLETION_FILE; then
if ! grep -Fxq "install_voip" $COMPLETION_FILE; then
return
fi
if [[ $(app_is_installed mumble) == "0" ]]; then
return
fi
apt-get -y remove --purge mumble-server
if [[ $ONION_ONLY == "no" ]]; then

View File

@ -253,7 +253,7 @@ function restore_remote_rss {
}
function remove_rss {
if ! grep -Fxq "install_rss" $COMPLETION_FILE; then
if [[ $(app_is_installed rss) == "0" ]]; then
return
fi
nginx_dissite $RSS_READER_DOMAIN_NAME

View File

@ -92,7 +92,7 @@ function restore_remote_searx {
}
function remove_searx {
if ! grep -Fxq "install_searx" $COMPLETION_FILE; then
if [[ $(app_is_installed searx) == "0" ]]; then
return
fi
systemctl stop searx

View File

@ -107,7 +107,7 @@ function restore_remote_sip {
}
function remove_sip {
if ! grep -Fxq "install_sip" $COMPLETION_FILE; then
if [[ $(app_is_installed sip) == "0" ]]; then
return
fi
iptables -D INPUT -p udp --dport $VOIP_TURN_PORT -j ACCEPT

View File

@ -178,7 +178,7 @@ function restore_remote_tahoelafs {
}
function remove_tahoelafs {
if ! grep -Fxq "install_tahoelafs" $COMPLETION_FILE; then
if [[ $(app_is_installed tahoelafs) == "0" ]]; then
return
fi
iptables -D INPUT -p udp --dport $TAHOELAFS_PORT -j ACCEPT

View File

@ -189,7 +189,7 @@ function restore_remote_tox {
}
function remove_tox_node {
if ! grep -Fxq "install_tox_node" $COMPLETION_FILE; then
if [[ $(app_is_installed tox_node) == "0" ]]; then
return
fi
@ -211,7 +211,7 @@ function remove_tox_node {
}
function remove_tox_avahi {
if ! grep -Fxq "tox_avahi" $COMPLETION_FILE; then
if [[ $(app_is_installed tox_avahi) == "0" ]]; then
return
fi
cd $INSTALL_DIR/toxid
@ -221,7 +221,7 @@ function remove_tox_avahi {
}
function remove_tox_client {
if ! grep -Fxq "install_tox_client" $COMPLETION_FILE; then
if [[ $(app_is_installed tox_client) == "0" ]]; then
return
fi

View File

@ -119,7 +119,7 @@ function restore_remote_webmail {
}
function remove_webmail {
if ! grep -Fxq "install_webmail" $COMPLETION_FILE; then
if [[ $(app_is_installed webmail) == "0" ]]; then
return
fi
nginx_dissite webmail

View File

@ -233,7 +233,7 @@ function restore_remote_wiki {
}
function remove_wiki {
if ! grep -Fxq "install_wiki" $COMPLETION_FILE; then
if [[ $(app_is_installed wiki) == "0" ]]; then
return
fi
function_check remove_onion_service

View File

@ -210,7 +210,7 @@ function configure_firewall_for_xmpp {
}
function remove_xmpp_client {
if ! grep -Fxq "install_xmpp_client" $COMPLETION_FILE; then
if [[ $(app_is_installed xmpp_client) == "0" ]]; then
return
fi
apt-get -y remove --purge profanity
@ -219,7 +219,7 @@ function remove_xmpp_client {
function remove_xmpp {
remove_xmpp_client
if ! grep -Fxq "install_xmpp" $COMPLETION_FILE; then
if [[ $(app_is_installed xmpp) == "0" ]]; then
return
fi
iptables -D INPUT -p tcp --dport 5222:5223 -j ACCEPT

View File

@ -89,7 +89,7 @@ function restore_remote_zeronet {
}
function remove_zeronet_blog {
if ! grep -Fxq "install_zeronet_blog" $COMPLETION_FILE; then
if [[ $(app_is_installed zeronet_blog) == "0" ]]; then
return
fi
if [ -d $MESH_INSTALL_DIR/zeronet/ZeroBlog ]; then
@ -100,7 +100,7 @@ function remove_zeronet_blog {
}
function remove_zeronet_mail {
if ! grep -Fxq "install_zeronet_mail" $COMPLETION_FILE; then
if [[ $(app_is_installed zeronet_mail) == "0" ]]; then
return
fi
if [ -d $MESH_INSTALL_DIR/zeronet/ZeroMail ]; then
@ -111,7 +111,7 @@ function remove_zeronet_mail {
}
function remove_zeronet_forum {
if ! grep -Fxq "install_zeronet_forum" $COMPLETION_FILE; then
if [[ $(app_is_installed zeronet_forum) == "0" ]]; then
return
fi
if [ -d $MESH_INSTALL_DIR/zeronet/ZeroTalk ]; then
@ -125,7 +125,7 @@ function remove_zeronet {
remove_zeronet_blog
remove_zeronet_mail
remove_zeronet_forum
if ! grep -Fxq "install_zeronet" $COMPLETION_FILE; then
if [[ $(app_is_installed zeronet) == "0" ]]; then
return
fi
iptables -D INPUT -i $WIFI_INTERFACE -p udp --dport $ZERONET_PORT -j ACCEPT