fix service check
This commit is contained in:
@@ -14,7 +14,7 @@ function restart_service() {
|
|||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ssh -i $SSH_KEY -p $SSH_PORT $SSH_USER@$SSH_HOST "sudo -n ipsec statusall | grep -i '1 up, 0 connecting'"
|
ssh -i $SSH_KEY -p $SSH_PORT $SSH_USER@$SSH_HOST "sudo -n ipsec statusall | grep -i 'Security Associations (1 up, 0 connecting):'"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
log_critical "Service $SERVICE_NAME not running after restart."
|
log_critical "Service $SERVICE_NAME not running after restart."
|
||||||
exit 2
|
exit 2
|
||||||
|
|||||||
Reference in New Issue
Block a user