From 92a26a388c59cb1db05e4e0333898e0901d9f470 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 12 Dec 2017 17:47:39 +0000 Subject: [PATCH] Disable scuttlebot site if it exists --- src/freedombone-app-scuttlebot | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/freedombone-app-scuttlebot b/src/freedombone-app-scuttlebot index b96403b2..a77949c3 100755 --- a/src/freedombone-app-scuttlebot +++ b/src/freedombone-app-scuttlebot @@ -195,8 +195,10 @@ function remove_scuttlebot { firewall_remove ${SCUTTLEBOT_PORT} firewall_remove ${GIT_SSB_PORT} - nginx_dissite ${SCUTTLEBOT_DOMAIN_NAME} - rm /etc/nginx/sites-available/${SCUTTLEBOT_DOMAIN_NAME} + if [ $SCUTTLEBOT_DOMAIN_NAME ]; then + nginx_dissite ${SCUTTLEBOT_DOMAIN_NAME} + rm /etc/nginx/sites-available/${SCUTTLEBOT_DOMAIN_NAME} + fi systemctl stop scuttlebot systemctl disable scuttlebot