summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2011-01-14 09:43:01 +1100
committerMartin Schwenke <martin@meltin.net>2011-08-11 10:46:56 +1000
commit1ea3616dccb794adb7973b808c5f6233738290a0 (patch)
tree9b0f320434116552877c34060420ef7710cc8f2b
parent2a14f9172286340ca5b7f24056e2195885d7918c (diff)
downloadsamba-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-xctdb/config/events.d/41.httpd12
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