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