From 0d47e305883182becb5775650dbbf621bae49bd8 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 1 Feb 2019 13:43:21 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 4b017545..0cc39e6c 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -26,7 +26,7 @@ case "$1" in do_with_root $CERT_DAEMON certonly --webroot -w /var/www/html -d $2 do_with_root chown -R root:letsencrypt /etc/letsencrypt do_with_root chmod -R 6775 /etc/letsencrypt - echo -e "${idsCL[LightGreen]}Waiting for Replication...${idsCL[Default]}" + echo -e "${idsCL[LightGreen]}Waiting for certifcate replication between the nodes...${idsCL[Default]}" sleep 20 "$0" service nginx reload exit 0 @@ -37,7 +37,7 @@ case "$1" in do_with_root $CERT_DAEMON renew --webroot -w /var/www/html 2>&1 | tee /opt/idssys/nodemgmt/cert-renewal.lastrun do_with_root chown -R root:letsencrypt /etc/letsencrypt 2>&1 | tee -a /opt/idssys/nodemgmt/cert-renewal.lastrun do_with_root chmod -R 6775 /etc/letsencrypt 2>&1 | tee -a /opt/idssys/nodemgmt/cert-renewal.lastrun - echo -e "${idsCL[LightGreen]}Waiting for Certificate Replication...${idsCL[Default]}" + echo -e "${idsCL[LightGreen]}Waiting for certifcate replication between the nodes...${idsCL[Default]}" sleep 20 "$0" service nginx reload 2>&1 | tee -a /opt/idssys/nodemgmt/cert-renewal.lastrun exit 0 @@ -55,6 +55,7 @@ case "$1" in newsite) NEW_SITE=${2} + echo -e "${idsCL[LightGreen]}Setting up new site for '${idsCL[Yellow]}${NEW_SITE}${idsCL[LightGreen]}'...${idsCL[Default]}" rm -f /etc/nginx/sites-available/${NEW_SITE}.conf rm -rf /var/www/${NEW_SITE} @@ -91,9 +92,14 @@ case "$1" in include conf.d/include/letsencrypt-acme-challenge.conf; } " > /etc/nginx/sites-available/${NEW_SITE}.conf - + echo -e "${idsCL[LightGreen]}Waiting for folder replication between the nodes...${idsCL[Default]}" + sleep 20 nodemgmt set-permissions ${NEW_SITE} nodemgmt newcert ${NEW_SITE} + echo "" + echo "" + echo -e "${idsCL[LightGreen]}The new site for '${idsCL[LightGreen]}${NEW_SITE}${idsCL[Default]}' has been created.${idsCL[Default]}" + echo "" ;; update)