Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-07 13:10:06 -06:00
parent 73ee1a78fd
commit ca69780ea4

View File

@@ -26,15 +26,15 @@ STATUS() {
else NCMD='' else NCMD=''
fi fi
for nip in "${NODE_HOSTS[@]}"; do # for nip in "${NODE_HOSTS[@]}"; do
if [ "${nip}" = '10.5.10.51' ] && [ ! -z ${LOCAL_SERVICES+x} ]; then isreplhost=true; else isreplhost=false; fi # if [ "${nip}" = '10.5.10.51' ] && [ ! -z ${LOCAL_SERVICES+x} ]; then isreplhost=true; else isreplhost=false; fi
if [[ $(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]] && [ "${isreplhost}" = "false" ]; then # if [[ $(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]] && [ "${isreplhost}" = "false" ]; then
NCMD="ssh root@${nip}" # NCMD="ssh root@${nip}"
for rcheck in "${REPL_CHECK[@]}"; do # for rcheck in "${REPL_CHECK[@]}"; do
${NCMD} touch ${REPL_CHECKS[${rcheck}]}/test.repl # ${NCMD} touch ${REPL_CHECKS[${rcheck}]}/test.repl
done # done
fi # fi
done # done
for rcheck in "${REPL_CHECK[@]}"; do for rcheck in "${REPL_CHECK[@]}"; do
${NCMD} rm -f ${FOLDER}/test.repl ${NCMD} rm -f ${FOLDER}/test.repl
daterun=`date +%Y-%m-%d-%H-%M-%S` daterun=`date +%Y-%m-%d-%H-%M-%S`