diff --git a/test.sh b/test.sh index 19b875e..ca71c69 100755 --- a/test.sh +++ b/test.sh @@ -2,6 +2,7 @@ source /opt/idssys/defaults/colors.inc source /opt/idssys/defaults/default.inc source /opt/idssys/nodemgmt/defaults.inc +source /opt/idssys/settings/nodemgmt.conf cd /opt/idssys/defaults @@ -18,13 +19,21 @@ if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remot exit 0 fi -IP=$(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1) -IP=${IP//$'\n'/}; IP=$(echo $IP | sed "s/10.5.10.56//g") -echo "'${IP}'" -echo "'${NODEHOSTS}'" -if [[ $IP == *"${NODEHOSTS}"* ]]; then - echo 'is a node' -else - echo 'not a node' -fi +if [ ! -z ${LOCAL_SERVICES+x} ]; + then NCMD='ssh root@10.5.10.51' + else NCMD='' +fi +echo "HERE: ${NCMD}" +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 + else + ${NCMD} 'echo -e "iDS-Node${nid} (${nip})\n${daterun}" > ${FOLDER}/test.repl' + fi + yes | ${NCMD} cp -rfH ${FOLDER}/test.repl ${REPL_CHECKS[${rcheck}]}/test.repl + echo "${FOLDER}/test.repl" + ${NCMD} cat ${FOLDER}/test.repl +done