Update nodemgmt-scripts.sh

This commit is contained in:
2019-04-01 23:23:36 -05:00
parent 7adabe6b06
commit 0e8cf31c1e

View File

@@ -390,7 +390,7 @@ NEWCERT(){
timeout=`date --date='2 minutes' +%s` timeout=`date --date='2 minutes' +%s`
until [ "${checked}" = "" ]; do until [ "${checked}" = "" ]; do
tchecked='' tchecked=''
for nip in "${MYSQL_HOSTS[@]}"; do for nip in "${WEB_HOSTS[@]}"; do
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then NCMD='' if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then NCMD=''
else NCMD="ssh root@${nip}" else NCMD="ssh root@${nip}"
fi fi
@@ -417,11 +417,12 @@ NEWCERT(){
echo "" echo ""
echo -e "${idsCL[Red]}Certificate could not be created for '${idsCL[Yellow]}${NEW_CERT}${idsCL[Red]}'...${idsCL[Default]}" echo -e "${idsCL[Red]}Certificate could not be created for '${idsCL[Yellow]}${NEW_CERT}${idsCL[Red]}'...${idsCL[Default]}"
fi fi
for nip in "${MYSQL_HOSTS[@]}"; do # for nip in "${WEB_HOSTS[@]}"; do
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
`ssh root@${nip} service nginx start` # `ssh root@${nip} service nginx start`
fi # fi
done # done
### SERVICE nginx reload
echo "" echo ""
if [ -z $action ] || [ "${action}" = "gui" ]; then if [ -z $action ] || [ "${action}" = "gui" ]; then
DIVIDER true DIVIDER true