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