Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-07 13:03:49 -06:00
parent a609c6670f
commit 6b8dc74cf3

View File

@@ -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`