Update test.sh

This commit is contained in:
2019-02-07 22:05:34 -06:00
parent 65463b53be
commit 0f1e0ffa19

19
test.sh
View File

@@ -26,12 +26,13 @@ CHECK_HOST(){
fi fi
} }
#check=`ssh root@10.5.10.53 "systemctl is-active --quiet haproxy && echo true"` errtime=$(stat -c %Y /opt/idssys/nodemgmt/10.5.10.53-haproxy.down)
#echo "HERE: '${check}'" timediff=`date +%s`-$errtime
srvc=haproxy echo $errtime
#if [ "$(ssh root@10.5.10.53 'systemctl is-active --quiet haproxy && echo true')" = "true" ]; then echo `date +%s`
if [ "$(ssh root@10.5.10.53 systemctl is-active ${srvc})" = "active" ]; then echo $timediff
echo 'yes' # if [ "" -gt "$timeout" ]; then
else # echo 'yes'
echo 'no' # else
fi # echo 'no'
# fi