From c3b0e39e9d95e2eebac7d4a2e2530fbf4edac8c7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 17 Jun 2020 22:28:36 +0100 Subject: [PATCH] Removal of onion deployment --- deploy/onion | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/deploy/onion b/deploy/onion index 09f8352e..56371305 100755 --- a/deploy/onion +++ b/deploy/onion @@ -1,5 +1,27 @@ #!/bin/bash +if [[ "$1" == 'remove' ]]; then + echo 'Removing Epicyon onion instance' + systemctl stop tor + rm /etc/torrc.d/epicyon + rm -rf /var/lib/tor/hidden_service_epicyon + systemctl restart tor + + systemctl stop epicyon + systemctl disable epicyon + rm /etc/nginx/sites-enabled/epicyon + rm /etc/nginx/sites-availale/epicyon + rm -rf /opt/epicyon + if [ -d /var/www/cache ]; then + rm -rf /var/www/cache + fi + if [ -d /srv/http/cache ]; then + rm -rf /srv/http/cache + fi + echo 'Epicyon onion instance removed' + exit 0 +fi + clear echo 'Installing Epicyon on an onion domain'