Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-08 15:45:47 -06:00
parent d358ac217d
commit d3997ff0d7

View File

@@ -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