Update nodemgmt-scripts.sh

This commit is contained in:
2023-04-25 16:48:09 -05:00
parent 7796ed4175
commit 6fa3f89dc8

View File

@@ -748,7 +748,11 @@ NEWCERT(){
echo -e "${NEW_CERT}\n${daterun}" > ${FOLDER}/cert-request.lastrun
yes | cp -rfH ${FOLDER}/cert-request.lastrun /opt/lb-data/letsencrypt/cert-request.lastrun
DIVIDER true
echo -e -n "${idsCL[LightCyan]}Reload NGINX on LB Nodes (Y/n): ${idsCL[Default]}"
read -n 1 NGINXRELOAD
if [[ ${NGINXRELOAD} =~ ^[Nn]$ ]]; then
tmp=''
else
echo -en "${idsCL[LightYellow]}Waiting for Cert replication across the nodes... ${idsCL[Default]}"
for nip in "${LB_HOSTS[@]}"; do
checkhost=$(CHECK_HOST ${nip})
@@ -765,17 +769,8 @@ NEWCERT(){
echo -e "${idsCL[Green]}Completed${idsCL[Default]}"
echo
echo -e -n "${idsCL[LightCyan]}Reload NGINX on LB Nodes (Y/n): ${idsCL[Default]}"
read -n 1 NGINXRELOAD
showdivide=yes
if [[ ${NGINXRELOAD} =~ ^[Nn]$ ]] || [ "${NGINXRELOAD}" == "" ]; then
SERVICE nginx reload
elif [[ ${NGINXRELOAD} =~ ^[Nn]$ ]]; then
tmp=''
else
SERVICE nginx reload
fi
fi
echo
echo -e "${idsCL[Green]}Certificate has been successfully created for '${idsCL[Yellow]}${NEW_CERT}${idsCL[Green]}'...${idsCL[Default]}"