diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 2e243eb8..818e17b6 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -77,11 +77,19 @@ CERTRENEW(){ 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${idsCL[LightYellow]}}Waiting for certifcate replication between the nodes...${idsCL[Default]}" + echo -e "${idsCL[LightYellow]}Waiting for certifcate replication between the nodes...${idsCL[Default]}" echo "" sleep 20 SERVICE nginx reload 2>&1 | tee -a /opt/idssys/nodemgmt/cert-renewal.lastrun } +NIGHTLYRENEW(){ + rm -f /opt/idssys/nodemgmt/cert-renewal.lastrun + do_with_root $CERT_DAEMON renew --webroot -w /var/www/html &>> /opt/idssys/nodemgmt/cert-renewal.lastrun + do_with_root chown -R root:letsencrypt /etc/letsencrypt &>> /opt/idssys/nodemgmt/cert-renewal.lastrun + do_with_root chmod -R 6775 /etc/letsencrypt &>> /opt/idssys/nodemgmt/cert-renewal.lastrun + sleep 20 + SERVICE nginx reload &>> /opt/idssys/nodemgmt/cert-renewal.lastrun +} LISTCERTS(){ #DIVIDER true @@ -130,15 +138,6 @@ LISTCERTS(){ echo "" } -NIGHTLYRENEW(){ - rm -f /opt/idssys/nodemgmt/cert-renewal.lastrun - do_with_root $CERT_DAEMON renew --webroot -w /var/www/html &>> /opt/idssys/nodemgmt/cert-renewal.lastrun - do_with_root chown -R root:letsencrypt /etc/letsencrypt &>> /opt/idssys/nodemgmt/cert-renewal.lastrun - do_with_root chmod -R 6775 /etc/letsencrypt &>> /opt/idssys/nodemgmt/cert-renewal.lastrun - sleep 20 - SERVICE nginx reload &>> /opt/idssys/nodemgmt/cert-renewal.lastrun -} - DELSITE(){ if [ ! -z ${1+x} ]; then DEL_SITE=${1}