diff options
author | Martin Schwenke <martin@meltin.net> | 2011-01-14 09:43:01 +1100 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2011-08-11 10:46:56 +1000 |
commit | 1ea3616dccb794adb7973b808c5f6233738290a0 (patch) | |
tree | 9b0f320434116552877c34060420ef7710cc8f2b | |
parent | 2a14f9172286340ca5b7f24056e2195885d7918c (diff) | |
download | samba-1ea3616dccb794adb7973b808c5f6233738290a0.tar.gz samba-1ea3616dccb794adb7973b808c5f6233738290a0.tar.xz samba-1ea3616dccb794adb7973b808c5f6233738290a0.zip |
Eventscripts: improvements to 41.httpd.
* Reduce the failure counts so that restart attempts happen sooner.
* Use service_start() and service_stop() for the restart.
ctdb_service_start() resets the failure count, which isn't very
useful in this context.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 01776b9f29af9ad5c8534649ece1bd100e450434)
-rwxr-xr-x | ctdb/config/events.d/41.httpd | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ctdb/config/events.d/41.httpd b/ctdb/config/events.d/41.httpd index 2006210cd5..6ae5d61b30 100755 --- a/ctdb/config/events.d/41.httpd +++ b/ctdb/config/events.d/41.httpd @@ -61,16 +61,16 @@ case "$1" in else ctdb_counter_incr - ctdb_check_counter_equal 5 || { + ctdb_check_counter warn -eq 2 || { echo "HTTPD is not running. Trying to restart HTTPD." - ctdb_service_stop - ctdb_service_start + service_stop + service_start exit 0 } - ctdb_check_counter_limit 10 quiet|| { + ctdb_check_counter warn -ge 5 || { echo "HTTPD is not running. Trying to restart HTTPD." - ctdb_service_stop - ctdb_service_start + service_stop + service_start exit 1 } fi |