From 6b8dc74cf3a12d19f34833d2e4de115b232a3fed Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 7 Feb 2019 13:03:49 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 4828e68e..3361e853 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -25,6 +25,16 @@ STATUS() { then NCMD='ssh root@10.5.10.51' else NCMD='' fi + + for nip in "${NODE_HOSTS[@]}"; do + 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 + NCMD="ssh root@${nip}" + for rcheck in "${REPL_CHECK[@]}"; do + ${NCMD} touch ${REPL_CHECKS[${rcheck}]}/test.repl + done + fi + done for rcheck in "${REPL_CHECK[@]}"; do ${NCMD} rm -f ${FOLDER}/test.repl daterun=`date +%Y-%m-%d-%H-%M-%S`