This commit is contained in:
2023-09-14 19:26:50 -05:00
parent 02fc0e9aca
commit 16f165f1e2
6 changed files with 25 additions and 22 deletions

View File

@@ -59,7 +59,7 @@ DELSITE(){
# echo -e "${idsCL[Green]}Done${idsCL[Default]}"
# nid=1
# for nip in "${WEB_HOSTS[@]}"; do
# for nip in "${NM_HOSTS['WEB'][@]}"; do
# if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then
# nip='localhost '
# NCMD=''
@@ -110,7 +110,7 @@ DELSITES(){
echo -e "${idsCL[Red]}Select a site to delete...${idsCL[Default]}"
DIVIDER true
sid=1
# filels="( $(ssh root@${LB_HOSTS[0]} ls ${NM_NGINXPATH}/sites-enabled/*) )"
# filels="( $(ssh root@${NM_HOSTS['LB'][0]} ls ${NM_NGINXPATH}/sites-enabled/*) )"
filels="( $(ls ${NM_NGINXPATH}/sites-enabled/*) )"
# IFS='\n'
for siteconf in $filels; do
@@ -174,7 +174,7 @@ LISTSITES(){
echo
echo -e "${idsCL[Red]}NGINX Site Config...${idsCL[Default]}"
DIVIDER true
# filels="( $(ssh root@${LB_HOSTS[0]} ls ${NM_NGINXPATH}/sites-enabled/*) )"
# filels="( $(ssh root@${NM_HOSTS['LB'][0]} ls ${NM_NGINXPATH}/sites-enabled/*) )"
filels="( $(ls ${NM_NGINXPATH}/sites-enabled/*) )"
for siteconf in $filels; do
if [ ${siteconf:0:1} == '/' ]; then
@@ -418,7 +418,7 @@ NEWSITE(){
sudo -u www-data mkdir -p /var/www/${MAIN_SITE}/{public_html,nginx_logs}
# echo -en "${idsCL[LightYellow]}Waiting for folder replication across the webserver nodes... ${idsCL[Default]}"
# for nip in "${WEB_HOSTS[@]}"; do
# for nip in "${NM_HOSTS['WEB'][@]}"; 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
@@ -478,7 +478,7 @@ NEWSITE(){
else
# echo
# echo -en "${idsCL[LightYellow]}Verifying '${NEW_SITE}' replication across the nodes... ${idsCL[Default]}"
# for nip in "${LB_HOSTS[@]}"; do
# for nip in "${NM_HOSTS['LB'][@]}"; 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