Update nodemgmt-scripts.sh
This commit is contained in:
@@ -467,30 +467,32 @@ DEL-SSL(){
|
||||
rm -f /etc/letsencrypt/renewal/${DEL_SSL}.conf
|
||||
echo -e "${idsCL[Green]}OK${idsCL[Default]}"
|
||||
echo ""
|
||||
echo -en "${idsCL[LightYellow]}Waiting for certificate replication between the nodes... ${idsCL[Default]}"
|
||||
checked=false
|
||||
timeout=`date --date='2 minutes' +%s`
|
||||
until [ "${checked}" = "" ]; do
|
||||
tchecked=''
|
||||
for nip in "${WEB_HOSTS[@]}"; do
|
||||
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then NCMD=''
|
||||
else NCMD="ssh root@${nip}"
|
||||
fi
|
||||
if [ "${NCMD}" != "" ]; then
|
||||
if ${NCMD} "[ -d /etc/letsencrypt/live/${DEL_SSL} ]"; then
|
||||
tchecked+=false
|
||||
else
|
||||
tchecked+=''
|
||||
fi
|
||||
fi
|
||||
done
|
||||
checked=${tchecked}
|
||||
if [ "`date +%s`" -gt "$timeout" ]; then
|
||||
echo -e "${idsCL[Red]}Timeout${idsCL[Default]}"
|
||||
timeout=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# echo -en "${idsCL[LightYellow]}Waiting for certificate replication between the nodes... ${idsCL[Default]}"
|
||||
# checked=false
|
||||
# timeout=`date --date='2 minutes' +%s`
|
||||
# until [ "${checked}" = "" ]; do
|
||||
# tchecked=''
|
||||
# for nip in "${WEB_HOSTS[@]}"; do
|
||||
# if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then NCMD=''
|
||||
# else NCMD="ssh root@${nip}"
|
||||
# fi
|
||||
# if [ "${NCMD}" != "" ]; then
|
||||
# if ${NCMD} "[ -d /etc/letsencrypt/live/${DEL_SSL} ]"; then
|
||||
# tchecked+=false
|
||||
# else
|
||||
# tchecked+=''
|
||||
# fi
|
||||
# fi
|
||||
# done
|
||||
# checked=${tchecked}
|
||||
# if [ "`date +%s`" -gt "$timeout" ]; then
|
||||
# echo -e "${idsCL[Red]}Timeout${idsCL[Default]}"
|
||||
# timeout=true
|
||||
# break
|
||||
# fi
|
||||
# done
|
||||
|
||||
else
|
||||
echo -e "${idsCL[LightRed]}The SSL files folder for '${idsCL[Red]}${DEL_SSL}${idsCL[LightRed]}' could not be found.${idsCL[Default]}"
|
||||
exit 1
|
||||
@@ -499,7 +501,7 @@ DEL-SSL(){
|
||||
echo -e "${idsCL[Green]}Completed${idsCL[Default]}"
|
||||
fi
|
||||
echo
|
||||
SERVICE nginx reload
|
||||
# SERVICE nginx reload
|
||||
echo -e "${idsCL[LightRed]}The SSL certificate has been removed fromt be nodes.${idsCL[Default]}"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user