Update nodemgmt-scripts.sh

This commit is contained in:
2019-04-03 19:34:19 -05:00
parent a574d33792
commit 9e0c7a3050

View File

@@ -371,7 +371,6 @@ NEWCERT(){
for nip in "${WEB_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
echo "restarting ${nip}"
# `ssh root@${nip} service nginx stop` # `ssh root@${nip} service nginx stop`
SERVICE nginx stop ${nip} SERVICE nginx stop ${nip}
fi fi
@@ -1263,7 +1262,7 @@ SERVICE(){
nid=1 nid=1
var2=${NTYPE}_HOSTS[@] var2=${NTYPE}_HOSTS[@]
for nip in "${!var2}"; do for nip in "${!var2}"; do
if [ ! -z ${3+x} ] || [ "${3}" == "q" ]; then GO=true; if [ -z ${3+x} ] || [ "${3}" == "q" ]; then GO=true;
elif [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${3}"* ]]; then GO=true; elif [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${3}"* ]]; then GO=true;
else GO=false; else GO=false;
fi fi