From 1c8e6a2eeac595a3cab1efa3fc0b0f25f3b1e68d Mon Sep 17 00:00:00 2001 From: root Date: Tue, 12 Feb 2019 18:24:32 +0100 Subject: [PATCH] better retart check --- check-frewe.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/check-frewe.sh b/check-frewe.sh index 017467c..10ed662 100755 --- a/check-frewe.sh +++ b/check-frewe.sh @@ -20,5 +20,12 @@ ${FWC} 2>&1 |grep "out of range" -q && \ (hub-ctrl -h 0 -P 2 -p 0; sleep 5; hub-ctrl -h 0 -P 2 -p 1; sleep 5; service frewe-client restart ) service frewe-client status|grep " active" || service frewe-client restart -service frewe-client status|grep "exited" && service frewe-client restart +if service frewe-client status|grep "exited"; then + if service frewe-client restart; then + echo restarted + else + killall -9 /usr/local/bin/frewe-client + service frewe-client start + fi +fi -- GitLab