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
|
||||
return
|
||||
fi
|
||||
if [ ${#FULLBLOG_DOMAIN_NAME} -eq 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}')
|
||||
|
|
|
@ -350,6 +350,9 @@ function remove_gnusocial {
|
|||
if [[ $(app_is_installed gnusocial) == "0" ]]; then
|
||||
return
|
||||
fi
|
||||
if [ ${#MICROBLOG_DOMAIN_NAME} -eq 0 ]; then
|
||||
return
|
||||
fi
|
||||
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}')
|
||||
fi
|
||||
|
|
|
@ -380,6 +380,9 @@ function remove_gogs {
|
|||
return
|
||||
fi
|
||||
|
||||
if [ ${#GIT_DOMAIN_NAME} -eq 0 ]; then
|
||||
return
|
||||
fi
|
||||
systemctl stop gogs
|
||||
systemctl disable gogs
|
||||
nginx_dissite ${GIT_DOMAIN_NAME}
|
||||
|
|
|
@ -319,6 +319,9 @@ function remove_hubzilla {
|
|||
if [[ $(app_is_installed hubzilla) == "0" ]]; then
|
||||
return
|
||||
fi
|
||||
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
|
||||
|
|
|
@ -246,6 +246,10 @@ function remove_rss {
|
|||
if [[ $(app_is_installed rss) == "0" ]]; then
|
||||
return
|
||||
fi
|
||||
if [ ${#RSS_READER_DOMAIN_NAME} -eq 0 ]; then
|
||||
return
|
||||
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}
|
||||
|
|
|
@ -212,8 +212,8 @@ 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}')
|
||||
if [ ${#WIKI_DOMAIN_NAME} -eq 0 ]; then
|
||||
return
|
||||
fi
|
||||
function_check remove_onion_service
|
||||
remove_onion_service wiki ${WIKI_ONION_PORT}
|
||||
|
|
Loading…
Reference in New Issue