2 # event script to manage httpd in a cluster environment
8 case $CTDB_INIT_STYLE in
14 service_name="apache2"
15 service_config="apache2"
19 # RHEL5 sometimes use a SIGKILL to terminate httpd, which then leaks
20 # semaphores. This is a hack to clean them up.
21 cleanup_httpd_semaphore_leak() {
22 killall -q -0 "$service_name" ||
23 for i in $(ipcs -s | awk '$3 == "apache" { print $2 }') ; do
30 service_start="cleanup_httpd_semaphore_leak; service $service_name start"
31 service_stop="service $service_name stop; killall -q -9 $service_name || true"
32 service_reconfigure="service $service_name restart"
36 ctdb_start_stop_service
38 is_ctdb_managed_service || exit 0
50 if ctdb_service_needs_reconfigure ; then
51 ctdb_service_reconfigure
55 if ! ctdb_check_tcp_ports 80 ; then
56 echo "HTTPD is not running. Trying to restart HTTPD."
63 ctdb_standard_event_handler "$@"