From 0f1e0ffa1963a88112a75d088eb4d2591c718578 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 7 Feb 2019 22:05:34 -0600 Subject: [PATCH] Update test.sh --- test.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/test.sh b/test.sh index 4358553..9426399 100755 --- a/test.sh +++ b/test.sh @@ -26,12 +26,13 @@ CHECK_HOST(){ fi } -#check=`ssh root@10.5.10.53 "systemctl is-active --quiet haproxy && echo true"` -#echo "HERE: '${check}'" -srvc=haproxy -#if [ "$(ssh root@10.5.10.53 'systemctl is-active --quiet haproxy && echo true')" = "true" ]; then -if [ "$(ssh root@10.5.10.53 systemctl is-active ${srvc})" = "active" ]; then - echo 'yes' -else - echo 'no' -fi \ No newline at end of file +errtime=$(stat -c %Y /opt/idssys/nodemgmt/10.5.10.53-haproxy.down) +timediff=`date +%s`-$errtime +echo $errtime +echo `date +%s` +echo $timediff +# if [ "" -gt "$timeout" ]; then +# echo 'yes' +# else +# echo 'no' +# fi \ No newline at end of file