From 7c880679ee0a9178692ccb817ba1cb22ad915dc3 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Tue, 26 Mar 2019 22:43:04 -0500 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 0c15a180..4ea6ff3a 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -36,21 +36,23 @@ STATUS(){ echo -e "${idsCL[LightCyan]}Setting up status checks...${idsCL[Default]}" echo fi - NHCMD="ssh root@${MYSQL_HOSTS[0]}" - LBHCMD="ssh root@${LB_HOSTS[0]}" - WHCMD="ssh root@${WEB_HOSTS[0]}" + #NHCMD="ssh root@${MYSQL_HOSTS[0]}" + #LBHCMD="ssh root@${LB_HOSTS[0]}" + #WHCMD="ssh root@${WEB_HOSTS[0]}" for NTYPE in "${NODE_TYPES[@]}"; do + PH=${NTYPE}_HOSTS[0] + PH_CMD="ssh root@${!PH}" var=${NTYPE}_REPL_CHECK[@] if [ ! -z ${!var+x} ]; then for rcheck in "${!var}"; do - ${NHCMD} rm -f ${FOLDER}/test.repl + ${PH_CMD} rm -f ${FOLDER}/test.repl daterun=`date +%Y-%m-%d-%H-%M-%S` - if [ "${NHCMD}" = "" ]; then + if [ "${PH_CMD}" = "" ]; then echo -e "${NM_NODETYPES[$NTYPE]}-Node${nid} (${nip})\n${daterun}" > ${FOLDER}/test.repl yes | cp -rfH ${FOLDER}/test.repl ${REPL_CHECKS[${rcheck}]}/test.repl else - ${NHCMD} "echo -e \"Status-Check (${NODE_HOSTNAME})\n${daterun}\" > ${FOLDER}/test.repl" - yes | ${NHCMD} "cp -rfH ${FOLDER}/test.repl ${REPL_CHECKS[${rcheck}]}/test.repl" + ${PH_CMD} "echo -e \"Status-Check (${NODE_HOSTNAME})\n${daterun}\" > ${FOLDER}/test.repl" + yes | ${PH_CMD} "cp -rfH ${FOLDER}/test.repl ${REPL_CHECKS[${rcheck}]}/test.repl" fi done fi