Update test.sh
This commit is contained in:
19
test.sh
19
test.sh
@@ -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
|
||||||
Reference in New Issue
Block a user