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}) var2=(${!var2})
unset IFS unset IFS
sethost=false sethost=false
echo $var2
fi fi
for nip in "${var2[@]}"; do for nip in "${var2[@]}"; do

View File

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