diff --git a/src/freedombone-app-batman b/src/freedombone-app-batman index 4bab5f9c..75538fe0 100755 --- a/src/freedombone-app-batman +++ b/src/freedombone-app-batman @@ -88,8 +88,8 @@ function remove_batman { echo $'Failed to remove batman' exit 79353 fi - sed -i '/install_batman/d' $COMPLETION_FILE - sed -i '/configure_firewall_for_batman/d' $COMPLETION_FILE + remove_completion_param install_batman + remove_completion_param configure_firewall_for_batman } function mesh_install_batman { diff --git a/src/freedombone-app-dlna b/src/freedombone-app-dlna index 07310f7e..1bda0405 100755 --- a/src/freedombone-app-dlna +++ b/src/freedombone-app-dlna @@ -164,7 +164,7 @@ function remove_dlna { iptables -D INPUT -p tcp --dport 8200 -j ACCEPT function_check save_firewall_settings save_firewall_settings - sed -i '/install_dlna/d' $COMPLETION_FILE + remove_completion_param install_dlna } function install_dlna_main { diff --git a/src/freedombone-app-dokuwiki b/src/freedombone-app-dokuwiki index 16af905d..fb70afee 100755 --- a/src/freedombone-app-dokuwiki +++ b/src/freedombone-app-dokuwiki @@ -184,7 +184,7 @@ function remove_dokuwiki { if [ -d /usr/share/dokuwiki ]; then rm -rf /usr/share/dokuwiki fi - sed -i '/install_dokuwiki/d' $COMPLETION_FILE + remove_completion_param install_dokuwiki } function get_dokuwiki_admin_password { diff --git a/src/freedombone-app-gnusocial b/src/freedombone-app-gnusocial index 2df256fa..ad5971a1 100755 --- a/src/freedombone-app-gnusocial +++ b/src/freedombone-app-gnusocial @@ -366,12 +366,12 @@ function remove_gnusocial { drop_database gnusocial function_check remove_onion_service remove_onion_service gnusocial ${GNUSOCIAL_ONION_PORT} - sed -i '/install_gnusocial/d' $COMPLETION_FILE - sed -i '/gnusocial /d' $COMPLETION_FILE if grep -q "gnusocial" /etc/crontab; then sed -i "/gnusocial/d" /etc/crontab fi remove_app gnusocial + remove_completion_param install_gnusocial + sed -i '/gnusocial /d' $COMPLETION_FILE } function install_gnusocial_main { diff --git a/src/freedombone-app-gogs b/src/freedombone-app-gogs index a94b1bb2..87a11042 100755 --- a/src/freedombone-app-gogs +++ b/src/freedombone-app-gogs @@ -345,7 +345,7 @@ function remove_gogs { rm /etc/systemd/system/gogs.service rm -rf /home/${GOGS_USERNAME}/* remove_onion_service gogs ${GIT_ONION_PORT} 9418 - sed -i '/install_gogs/d' $COMPLETION_FILE + remove_completion_param install_gogs sed -i '/gogs /d' $COMPLETION_FILE } diff --git a/src/freedombone-app-hubzilla b/src/freedombone-app-hubzilla index 5843f700..6aa64fb5 100755 --- a/src/freedombone-app-hubzilla +++ b/src/freedombone-app-hubzilla @@ -275,7 +275,6 @@ function remove_hubzilla { if [ ${#HUBZILLA_DOMAIN_NAME} -eq 0 ]; then return fi - echo $'Removing Hubzilla' nginx_dissite $HUBZILLA_DOMAIN_NAME if [ -d /var/www/$HUBZILLA_DOMAIN_NAME ]; then rm -rf /var/www/$HUBZILLA_DOMAIN_NAME @@ -288,7 +287,6 @@ function remove_hubzilla { function_check remove_onion_service remove_onion_service hubzilla ${HUBZILLA_ONION_PORT} sed -i '/hubzilla/d' $COMPLETION_FILE - echo $'Hubzilla was removed' } function install_hubzilla { diff --git a/src/freedombone-app-ipfs b/src/freedombone-app-ipfs index c81e6ea5..0cd0d0f3 100755 --- a/src/freedombone-app-ipfs +++ b/src/freedombone-app-ipfs @@ -165,9 +165,9 @@ function remove_ipfs_go { iptables -D INPUT -p tcp --dport $IPFS_PORT -j ACCEPT function_check save_firewall_settings save_firewall_settings - sed -i '/install_ipfs/d' $COMPLETION_FILE + remove_completion_param install_ipfs + remove_completion_param configure_firewall_for_ipfs sed -i '/ipfs/d' $COMPLETION_FILE - sed -i '/configure_firewall_for_ipfs/d' $COMPLETION_FILE } function remove_ipfs_js { diff --git a/src/freedombone-app-irc b/src/freedombone-app-irc index 55db2911..3f000ca2 100755 --- a/src/freedombone-app-irc +++ b/src/freedombone-app-irc @@ -247,9 +247,9 @@ function remove_irc { save_firewall_settings function_check remove_onion_service remove_onion_service irc ${IRC_ONION_PORT} - sed -i '/install_irc/d' ${COMPLETION_FILE} + remove_completion_param install_irc + remove_completion_param configure_firewall_for_irc sed -i '/IRC /d' ${COMPLETION_FILE} - sed -i '/configure_firewall_for_irc/d' ${COMPLETION_FILE} } function configure_firewall_for_irc { diff --git a/src/freedombone-app-librevault b/src/freedombone-app-librevault index fdb1b466..d5f25b9c 100755 --- a/src/freedombone-app-librevault +++ b/src/freedombone-app-librevault @@ -115,8 +115,8 @@ function remove_librevault { systemctl stop librevault systemctl disable librevault rm /etc/systemd/system/librevault.service - sed -i '/install_librevault/d' $COMPLETION_FILE - sed -i '/configure_firewall_for_librevault/d' $COMPLETION_FILE + remove_completion_param install_librevault + remove_completion_param configure_firewall_for_librevault } function configure_firewall_for_librevault { diff --git a/src/freedombone-app-pelican b/src/freedombone-app-pelican index d39ee302..088bcd56 100755 --- a/src/freedombone-app-pelican +++ b/src/freedombone-app-pelican @@ -76,7 +76,10 @@ function restore_remote_pelican { } function remove_pelican { - echo -n '' + if [ -d /var/www/$STATIC_BLOG_DOMAIN/htdocs ]; then + rm -rf /var/www/$STATIC_BLOG_DOMAIN/htdocs + fi + pip uninstall pelican } function create_pelican_conf { diff --git a/src/freedombone-app-rss b/src/freedombone-app-rss index eb04038b..f7c4a0fb 100755 --- a/src/freedombone-app-rss +++ b/src/freedombone-app-rss @@ -261,8 +261,9 @@ function remove_rss { fi function_check drop_database drop_database ttrss - sed -i '/install_rss/d' $COMPLETION_FILE + remove_completion_param install_rss sed -i '/RSS /d' $COMPLETION_FILE + sed -i '/rss /d' $COMPLETION_FILE } function rss_modifications { diff --git a/src/freedombone-app-searx b/src/freedombone-app-searx index 7ba450ae..036822b6 100755 --- a/src/freedombone-app-searx +++ b/src/freedombone-app-searx @@ -109,7 +109,7 @@ function remove_searx { if [ -d ${SEARX_PATH}/searx ]; then rm -rf ${SEARX_PATH}/searx fi - sed -i '/install_searx/d' $COMPLETION_FILE + remove_completion_param install_searx sed -i '/Search engine /d' $COMPLETION_FILE } diff --git a/src/freedombone-app-sip b/src/freedombone-app-sip index 6323a9c8..911d89d3 100755 --- a/src/freedombone-app-sip +++ b/src/freedombone-app-sip @@ -177,9 +177,9 @@ function remove_sip { if [ -d /etc/turnserver ]; then rm -rf /etc/turnserver fi - sed -i '/install_sip/d' $COMPLETION_FILE - sed -i '/configure_firewall_for_turn/d' $COMPLETION_FILE - sed -i '/configure_firewall_for_sip4/d' $COMPLETION_FILE + remove_completion_param install_sip + remove_completion_param configure_firewall_for_turn + remove_completion_param configure_firewall_for_sip4 } function configure_firewall_for_turn { diff --git a/src/freedombone-app-syncthing b/src/freedombone-app-syncthing index c0fe2a4d..6650349a 100755 --- a/src/freedombone-app-syncthing +++ b/src/freedombone-app-syncthing @@ -470,8 +470,8 @@ function remove_syncthing { apt-get -y remove --purge syncthing rm /etc/systemd/system/syncthing.service sed -i "/${PROJECT_NAME}-syncthing/d" /etc/crontab - sed -i '/install_syncthing/d' $COMPLETION_FILE - sed -i '/configure_firewall_for_syncthing/d' $COMPLETION_FILE + remove_completion_param install_syncthing + remove_completion_param configure_firewall_for_syncthing systemctl restart cron } diff --git a/src/freedombone-app-tahoelafs b/src/freedombone-app-tahoelafs index de92dade..f93b7930 100755 --- a/src/freedombone-app-tahoelafs +++ b/src/freedombone-app-tahoelafs @@ -198,8 +198,8 @@ function remove_tahoelafs { rm -rf /var/lib/tahoelafs - sed -i '/install_tahoelafs/d' $COMPLETION_FILE - sed -i '/configure_firewall_for_tahoelafs/d' $COMPLETION_FILE + remove_completion_param install_tahoelafs + remove_completion_param configure_firewall_for_tahoelafs } function configure_firewall_for_tahoelafs { diff --git a/src/freedombone-app-tox b/src/freedombone-app-tox index ab36abf8..d3f16f88 100755 --- a/src/freedombone-app-tox +++ b/src/freedombone-app-tox @@ -252,8 +252,8 @@ function remove_tox_node { echo $'Failed to remove tox node' exit 763836 fi - sed -i '/install_tox_node/d' $COMPLETION_FILE - sed -i '/configure_firewall_for_tox/d' $COMPLETION_FILE + remove_completion_param install_tox_node + remove_completion_param configure_firewall_for_tox } function remove_tox_avahi { diff --git a/src/freedombone-app-vpn b/src/freedombone-app-vpn index 079c3614..fec65b75 100755 --- a/src/freedombone-app-vpn +++ b/src/freedombone-app-vpn @@ -67,7 +67,7 @@ function restore_remote_vpn { function remove_vpn { apt-get -y remove --purge fastd - sed -i '/install_vpn/d' $COMPLETION_FILE + remove_completion_param install_vpn } function install_vpn { diff --git a/src/freedombone-app-webmail b/src/freedombone-app-webmail index 200138fb..088c0dbf 100755 --- a/src/freedombone-app-webmail +++ b/src/freedombone-app-webmail @@ -135,7 +135,8 @@ function remove_webmail { rm -rf $WEB_PATH/webmail fi sed -i '/Webmail /d' $COMPLETION_FILE - sed -i '/install_webmail/d' $COMPLETION_FILE + sed -i '/webmail /d' $COMPLETION_FILE + remove_completion_param install_webmail } function install_webmail { diff --git a/src/freedombone-app-xmpp b/src/freedombone-app-xmpp index 7ecd97fe..6217f1f9 100755 --- a/src/freedombone-app-xmpp +++ b/src/freedombone-app-xmpp @@ -262,7 +262,7 @@ function configure_firewall_for_xmpp { function remove_xmpp_client { apt-get -y remove --purge profanity - sed '/install_xmpp_client/d' $COMPLETION_FILE + remove_completion_param install_xmpp_client } function remove_xmpp { @@ -284,7 +284,7 @@ function remove_xmpp { rm -rf /etc/prosody fi - sed '/install_xmpp/d' $COMPLETION_FILE + remove_completion_param install_xmpp sed '/xmpp /d' $COMPLETION_FILE } diff --git a/src/freedombone-app-zeronet b/src/freedombone-app-zeronet index 3d7fd880..5d0f8c28 100755 --- a/src/freedombone-app-zeronet +++ b/src/freedombone-app-zeronet @@ -100,24 +100,25 @@ function remove_zeronet_blog { if [ -d $MESH_INSTALL_DIR/zeronet/ZeroBlog ]; then rm -rf $MESH_INSTALL_DIR/zeronet/ZeroBlog fi - sed -i '/install_zeronet_blog/d' $COMPLETION_FILE + remove_completion_param install_zeronet_blog sed -i '/ZeroNet Blog/d' $COMPLETION_FILE + sed -i '/zeronet blog/d' $COMPLETION_FILE } function remove_zeronet_mail { if [ -d $MESH_INSTALL_DIR/zeronet/ZeroMail ]; then rm -rf $MESH_INSTALL_DIR/zeronet/ZeroMail fi - sed -i '/install_zeronet_mail/d' $COMPLETION_FILE - sed -i '/zeroNet /d' $COMPLETION_FILE + remove_completion_param install_zeronet_mail + sed -i '/zeronet mail/d' $COMPLETION_FILE } function remove_zeronet_forum { if [ -d $MESH_INSTALL_DIR/zeronet/ZeroTalk ]; then rm -rf $MESH_INSTALL_DIR/zeronet/ZeroTalk fi - sed -i '/install_zeronet_forum/d' $COMPLETION_FILE - sed -i '/ZeroNet Forum/d' $COMPLETION_FILE + remove_completion_param install_zeronet_forum + sed -i '/zeronet forum/d' $COMPLETION_FILE } function remove_zeronet { @@ -132,9 +133,9 @@ function remove_zeronet { function_check save_firewall_settings save_firewall_settings ${PROJECT_NAME}-mesh-install -f zeronet --remove yes - sed -i '/install_zeronet/d' $COMPLETION_FILE - sed -i '/ZeroNet /d' $COMPLETION_FILE - sed -i '/configure_firewall_for_zeronet/d' $COMPLETION_FILE + remove_completion_param install_zeronet + remove_completion_param configure_firewall_for_zeronet + sed -i '/zeronet /d' $COMPLETION_FILE } function configure_firewall_for_zeronet {