1
0
mirror of https://github.com/samba-team/samba.git synced 2025-09-23 01:44:20 +03:00

ctdb-scripts: Drop use of ctdb_check_counter from httpd event script

This makes the logic more obvious.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke
2016-07-06 14:24:18 +10:00
committed by Amitay Isaacs
parent fc53256c3f
commit 92d0d4489e

View File

@@ -61,19 +61,18 @@ monitor)
ctdb_counter_init
else
ctdb_counter_incr
ctdb_check_counter warn -eq 2 || {
num_fails=$(ctdb_counter_get)
if [ "$num_fails" -eq 2 ] ; then
echo "HTTPD is not running. Trying to restart HTTPD."
service_stop
service_start
exit 0
}
ctdb_check_counter warn -ge 5 || {
elif [ "$num_fails" -ge 5 ] ; then
echo "HTTPD is not running. Trying to restart HTTPD."
service_stop
service_start
exit 1
}
fi
fi
;;
esac