From 7b1a50c54a0cb47d30718d7e32b68ddb9a2a0dbf Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 30 Sep 2016 20:06:08 +0100 Subject: [PATCH] Get domain name when removing apps --- src/freedombone-app-blog | 3 +++ src/freedombone-app-gnusocial | 3 +++ src/freedombone-app-gogs | 3 +++ src/freedombone-app-rss | 3 +++ src/freedombone-app-wiki | 3 +++ 5 files changed, 15 insertions(+) diff --git a/src/freedombone-app-blog b/src/freedombone-app-blog index 9a3916b3..f304f948 100755 --- a/src/freedombone-app-blog +++ b/src/freedombone-app-blog @@ -314,6 +314,9 @@ function remove_blog { if [[ $(app_is_installed blog) == "0" ]]; then return fi + if grep -q "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then + FULLBLOG_DOMAIN_NAME=$(grep "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') + fi if [ ! -d /var/www/$FULLBLOG_DOMAIN_NAME ]; then rm -rf /var/www/$FULLBLOG_DOMAIN_NAME fi diff --git a/src/freedombone-app-gnusocial b/src/freedombone-app-gnusocial index 3a4bd2db..a8d266f6 100755 --- a/src/freedombone-app-gnusocial +++ b/src/freedombone-app-gnusocial @@ -340,6 +340,9 @@ function remove_gnusocial { if [[ $(app_is_installed gnusocial) == "0" ]]; then return fi + if grep -q "MICROBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then + MICROBLOG_DOMAIN_NAME=$(grep "MICROBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') + fi nginx_dissite $MICROBLOG_DOMAIN_NAME if [ -d /var/www/$MICROBLOG_DOMAIN_NAME ]; then rm -rf /var/www/$MICROBLOG_DOMAIN_NAME diff --git a/src/freedombone-app-gogs b/src/freedombone-app-gogs index c95b2b08..3479c2a8 100755 --- a/src/freedombone-app-gogs +++ b/src/freedombone-app-gogs @@ -400,6 +400,9 @@ function remove_gogs { return fi + if grep -q "GIT_DOMAIN_NAME" $CONFIGURATION_FILE; then + GIT_DOMAIN_NAME=$(grep "GIT_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') + fi systemctl stop gogs systemctl disable gogs nginx_dissite $GIT_DOMAIN_NAME diff --git a/src/freedombone-app-rss b/src/freedombone-app-rss index 66bb82aa..fad512f2 100755 --- a/src/freedombone-app-rss +++ b/src/freedombone-app-rss @@ -256,6 +256,9 @@ function remove_rss { if [[ $(app_is_installed rss) == "0" ]]; then return fi + if grep -q "RSS_READER_DOMAIN_NAME" $CONFIGURATION_FILE; then + RSS_READER_DOMAIN_NAME=$(grep "RSS_READER_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') + fi nginx_dissite $RSS_READER_DOMAIN_NAME function_check remove_onion_service remove_onion_service ttrss ${RSS_READER_ONION_PORT} ${RSS_MOBILE_READER_ONION_PORT} diff --git a/src/freedombone-app-wiki b/src/freedombone-app-wiki index ef90d32a..c5806fa7 100755 --- a/src/freedombone-app-wiki +++ b/src/freedombone-app-wiki @@ -236,6 +236,9 @@ function remove_wiki { if [[ $(app_is_installed wiki) == "0" ]]; then return fi + if grep -q "WIKI_DOMAIN_NAME" $CONFIGURATION_FILE; then + WIKI_DOMAIN_NAME=$(grep "WIKI_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') + fi function_check remove_onion_service remove_onion_service wiki ${WIKI_ONION_PORT} nginx_dissite $WIKI_DOMAIN_NAME