From 8df611b0f9668c730c69331cb99ed91fa1546e86 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 3 Jul 2016 22:00:09 +0100 Subject: [PATCH] function to remove ipfs --- src/freedombone-app-gogs | 1 - src/freedombone-app-ipfs | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/freedombone-app-gogs b/src/freedombone-app-gogs index 2bee2fd4..5426ef10 100755 --- a/src/freedombone-app-gogs +++ b/src/freedombone-app-gogs @@ -55,7 +55,6 @@ function remove_gogs { drop_database gogs rm /etc/systemd/system/gogs.service rm -rf $GOPATH/src/github.com/gogits - userdel -r git sed -i '/install_gogs/d' $COMPLETION_FILE sed -i '/Gogs /d' $COMPLETION_FILE } diff --git a/src/freedombone-app-ipfs b/src/freedombone-app-ipfs index 3037e6a0..fc7d2a39 100755 --- a/src/freedombone-app-ipfs +++ b/src/freedombone-app-ipfs @@ -32,6 +32,25 @@ IPFS_GO_REPO="https://github.com/ipfs/go-ipfs" IPFS_COMMIT='20b06a4cbce8884f5b194da6e98cb11f2c77f166' IPFS_PORT=4001 +function remove_ipfs { + if ! grep -Fxq "install_ipfs" $COMPLETION_FILE; then + return + fi + function_check select_go_version + select_go_version + systemctl stop ipfs + systemctl disable ipfs + systemctl daemon-reload + rm /etc/systemd/system/ipfs.service + rm -rf $GOPATH/src/github.com/ipfs + 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 + sed -i '/ipfs /d' $COMPLETION_FILE + sed -i '/configure_firewall_for_ipfs/d' $COMPLETION_FILE +} + function configure_firewall_for_ipfs { if [[ $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" ]]; then return