diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index aa5fc94c..34c1d898 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -430,6 +430,16 @@ NEWCERT(){ if [ "${NEW_CERT}" != "" ]; then echo -e "${idsCL[LightGreen]}Requesting Certificate for '${idsCL[Yellow]}${NEW_CERT}${idsCL[LightGreen]}'...${idsCL[Default]}" echo "" + + nid=1 + for nip in "${NODE_HOSTS[@]}"; do + if [[ $(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]]; then + echo $nip + `ssh root@${nip} service haproxy stop` + fi + nid=`expr $nid + 1` + 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} if [ -f /etc/letsencrypt/live/${MAIN_CERT}/cert.pem ]; then