From c4a73a6b7b5899d410344fc585bef5c4788e0523 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 1 Apr 2019 23:38:37 -0500 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index d15f05c6..7654f397 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -367,13 +367,13 @@ NEWCERT(){ echo -e "${idsCL[LightGreen]}Requesting Certificate for '${idsCL[Yellow]}${NEW_CERT}${idsCL[LightGreen]}'...${idsCL[Default]}" echo "" - # for nip in "${WEB_HOSTS[@]}"; do - # if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]]; then - # `ssh root@${nip} service nginx stop` - # fi - # done + for nip in "${WEB_HOSTS[@]}"; do + if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]]; then + `ssh root@${nip} service nginx stop` + fi + done - $CERT_DAEMON certonly --webroot -w /var/www/html -d ${NEW_CERT} + $CERT_DAEMON certonly --dry-run --webroot -w /var/www/html -d ${NEW_CERT} # $CERT_DAEMON certonly --dry-run --webroot -w /var/www/html -d ${NEW_CERT} if [ -f /etc/letsencrypt/live/${MAIN_CERT}/cert.pem ]; then chown -R root:letsencrypt /etc/letsencrypt @@ -417,12 +417,11 @@ NEWCERT(){ echo "" echo -e "${idsCL[Red]}Certificate could not be created for '${idsCL[Yellow]}${NEW_CERT}${idsCL[Red]}'...${idsCL[Default]}" fi - # for nip in "${WEB_HOSTS[@]}"; do - # if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]]; then - # `ssh root@${nip} service nginx start` - # fi - # done - ### SERVICE nginx reload + for nip in "${WEB_HOSTS[@]}"; do + if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]]; then + `ssh root@${nip} service nginx start` + fi + done echo "" if [ -z $action ] || [ "${action}" = "gui" ]; then DIVIDER true