Update test.sh

This commit is contained in:
2019-02-07 13:57:53 -06:00
parent 52f0731369
commit a92184f5aa

27
test.sh
View File

@@ -19,22 +19,13 @@ if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remot
exit 0
fi
if [ ! -z ${LOCAL_SERVICES+x} ];
then NCMD='ssh root@10.5.10.51'
else NCMD=''
fi
echo "HERE: (${NODE_HOSTNAME})"
for rcheck in "${REPL_CHECK[@]}"; do
${NCMD} rm -f ${FOLDER}/test.repl
daterun=`date +%Y-%m-%d-%H-%M-%S`
if [ "${NCMD}" = "" ]; then
echo -e "iDS-Node${nid} (${nip})\n${daterun}" > ${FOLDER}/test.repl
yes | cp -rfH ${FOLDER}/test.repl ${REPL_CHECKS[${rcheck}]}/test.repl
else
${NCMD} "echo -e \"Status-Check (${NODE_HOSTNAME})\n${daterun}\" > ${FOLDER}/test.repl"
yes | ${NCMD} "cp -rfH ${FOLDER}/test.repl ${REPL_CHECKS[${rcheck}]}/test.repl"
CHECK_HOST(){
ping -c 3 ${1} > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo false
else echo true
fi
echo "${FOLDER}/test.repl"
${NCMD} "cat ${REPL_CHECKS[${rcheck}]}/test.repl"
done
}
echo CHECK_HOST