This commit is contained in:
2023-07-08 23:01:39 -05:00
parent 6e9108e238
commit a4620e8a84
2 changed files with 15 additions and 16 deletions

View File

@@ -276,7 +276,6 @@ SERVICE(){
var2=(${!var2})
unset IFS
sethost=false
echo $var2
fi
for nip in "${var2[@]}"; do

View File

@@ -450,21 +450,21 @@ NEWSITE(){
if [[ ${NGINXRELOAD} =~ ^[Nn]$ ]]; then
tmp=''
else
echo
echo -en "${idsCL[LightYellow]}Verifying '${NEW_SITE}' replication across the nodes... ${idsCL[Default]}"
for nip in "${LB_HOSTS[@]}"; do
checkhost=$(CHECK_HOST ${nip})
if [ "${checkhost}" != "false" ]; then
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]]; then
checked=false
until [ "${checked}" = "" ]; do
checked=`ssh root@${nip} "[ ! -f ${nginxconfig} ] && echo '.'"`
done
fi
fi
done
rm -f /opt/lb-data/letsencrypt/live/${MAIN_CERT}/newcert
echo -e "${idsCL[Green]}Completed${idsCL[Default]}"
# echo
# echo -en "${idsCL[LightYellow]}Verifying '${NEW_SITE}' replication across the nodes... ${idsCL[Default]}"
# for nip in "${LB_HOSTS[@]}"; do
# checkhost=$(CHECK_HOST ${nip})
# if [ "${checkhost}" != "false" ]; then
# if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]]; then
# checked=false
# until [ "${checked}" = "" ]; do
# checked=`ssh root@${nip} "[ ! -f ${nginxconfig} ] && echo '.'"`
# done
# fi
# fi
# done
# rm -f /opt/lb-data/letsencrypt/live/${MAIN_CERT}/newcert
# echo -e "${idsCL[Green]}Completed${idsCL[Default]}"
echo
SERVICE nginx restart