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