Update nodemgmt-scripts.sh
This commit is contained in:
@@ -168,7 +168,7 @@ CERTRENEW(){
|
||||
DIVIDER true
|
||||
echo -en "${idsCL[LightYellow]}Waiting for certifcate replication between the nodes... ${idsCL[Default]}"
|
||||
checked=false
|
||||
timeout=`date --date='10 seconds' +%s`
|
||||
timeout=`date --date='1 minutes' +%s`
|
||||
until [ "${checked}" = "" ]; do
|
||||
tchecked=''
|
||||
for nip in "${NODE_HOSTS[@]}"; do
|
||||
@@ -181,11 +181,12 @@ CERTRENEW(){
|
||||
done
|
||||
checked=${tchecked}
|
||||
if [ "`date +%s`" -gt "$timeout" ]; then
|
||||
echo 'timeout'
|
||||
|
||||
echo -e "${idsCL[Red]}Timeout${idsCL[Default]}"
|
||||
echo "Timeout occured in waiting for replication between nodes." | mail -s "Nightly-Cert-Renewal" ${STATUS_CHECK_EMAIL}
|
||||
break
|
||||
fi
|
||||
done
|
||||
echo -e "${idsCL[Green]}Completed${idsCL[Default]}"
|
||||
SERVICE nginx reload 2>&1 | tee -a /opt/idssys/nodemgmt/cert-renewal.lastrun
|
||||
}
|
||||
NIGHTLYRENEW(){
|
||||
@@ -197,7 +198,7 @@ NIGHTLYRENEW(){
|
||||
daterun=`date +%Y-%m-%d-%H-%M`
|
||||
echo -e "${daterun}" >> /etc/letsencrypt/cert-renewal.lastrun
|
||||
checked=false
|
||||
timeout=`date --date='10 seconds' +%s`
|
||||
timeout=`date --date='2 minutes' +%s`
|
||||
until [ "${checked}" = "" ]; do
|
||||
tchecked=''
|
||||
for nip in "${NODE_HOSTS[@]}"; do
|
||||
@@ -210,7 +211,7 @@ NIGHTLYRENEW(){
|
||||
done
|
||||
checked=${tchecked}
|
||||
if [ "`date +%s`" -gt "$timeout" ]; then
|
||||
echo "Timeout occured in waiting for replication between nodes." | mail -s "Cert-Renewal" ${STATUS_CHECK_EMAIL}
|
||||
echo "Timeout occured in waiting for replication between nodes." | mail -s "Nightly-Cert-Renewal" ${STATUS_CHECK_EMAIL}
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user