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