Ensure that a domain is provided before removing
This commit is contained in:
parent
e9a23cb1a9
commit
5025c5c227
|
@ -332,6 +332,9 @@ function remove_blog {
|
||||||
if [[ $(app_is_installed blog) == "0" ]]; then
|
if [[ $(app_is_installed blog) == "0" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
if [ ${#FULLBLOG_DOMAIN_NAME} -eq 0 ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
if grep -q "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
if grep -q "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||||
FULLBLOG_DOMAIN_NAME=$(grep "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
FULLBLOG_DOMAIN_NAME=$(grep "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||||
|
|
|
@ -350,6 +350,9 @@ function remove_gnusocial {
|
||||||
if [[ $(app_is_installed gnusocial) == "0" ]]; then
|
if [[ $(app_is_installed gnusocial) == "0" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
if [ ${#MICROBLOG_DOMAIN_NAME} -eq 0 ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
if grep -q "MICROBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
if grep -q "MICROBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||||
MICROBLOG_DOMAIN_NAME=$(grep "MICROBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | head -n 1 | awk -F '=' '{print $2}')
|
MICROBLOG_DOMAIN_NAME=$(grep "MICROBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | head -n 1 | awk -F '=' '{print $2}')
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -380,6 +380,9 @@ function remove_gogs {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ${#GIT_DOMAIN_NAME} -eq 0 ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
systemctl stop gogs
|
systemctl stop gogs
|
||||||
systemctl disable gogs
|
systemctl disable gogs
|
||||||
nginx_dissite ${GIT_DOMAIN_NAME}
|
nginx_dissite ${GIT_DOMAIN_NAME}
|
||||||
|
|
|
@ -319,6 +319,9 @@ function remove_hubzilla {
|
||||||
if [[ $(app_is_installed hubzilla) == "0" ]]; then
|
if [[ $(app_is_installed hubzilla) == "0" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
if [ ${#HUBZILLA_DOMAIN_NAME} -eq 0 ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
echo $'Removing Hubzilla'
|
echo $'Removing Hubzilla'
|
||||||
nginx_dissite $HUBZILLA_DOMAIN_NAME
|
nginx_dissite $HUBZILLA_DOMAIN_NAME
|
||||||
if [ -d /var/www/$HUBZILLA_DOMAIN_NAME ]; then
|
if [ -d /var/www/$HUBZILLA_DOMAIN_NAME ]; then
|
||||||
|
|
|
@ -246,6 +246,10 @@ function remove_rss {
|
||||||
if [[ $(app_is_installed rss) == "0" ]]; then
|
if [[ $(app_is_installed rss) == "0" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
if [ ${#RSS_READER_DOMAIN_NAME} -eq 0 ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
nginx_dissite $RSS_READER_DOMAIN_NAME
|
nginx_dissite $RSS_READER_DOMAIN_NAME
|
||||||
function_check remove_onion_service
|
function_check remove_onion_service
|
||||||
remove_onion_service ttrss ${RSS_READER_ONION_PORT} ${RSS_MOBILE_READER_ONION_PORT}
|
remove_onion_service ttrss ${RSS_READER_ONION_PORT} ${RSS_MOBILE_READER_ONION_PORT}
|
||||||
|
|
|
@ -212,8 +212,8 @@ function remove_wiki {
|
||||||
if [[ $(app_is_installed wiki) == "0" ]]; then
|
if [[ $(app_is_installed wiki) == "0" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if grep -q "WIKI_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
if [ ${#WIKI_DOMAIN_NAME} -eq 0 ]; then
|
||||||
WIKI_DOMAIN_NAME=$(grep "WIKI_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
return
|
||||||
fi
|
fi
|
||||||
function_check remove_onion_service
|
function_check remove_onion_service
|
||||||
remove_onion_service wiki ${WIKI_ONION_PORT}
|
remove_onion_service wiki ${WIKI_ONION_PORT}
|
||||||
|
|
Loading…
Reference in New Issue