1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

add eventscript for http

(This used to be ctdb commit 16cba208b041c2bd8dbf801af89dcbcde486abf2)
This commit is contained in:
Ronnie Sahlberg 2008-01-11 10:44:16 +11:00
parent 64c39438df
commit 59327234ac
4 changed files with 34 additions and 0 deletions

View File

@ -177,6 +177,7 @@ install: all
${INSTALLCMD} -m 755 config/events.d/00.ctdb $(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m 755 config/events.d/10.interface $(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m 755 config/events.d/40.vsftpd $(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m 755 config/events.d/41.httpd $(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m 755 config/events.d/50.samba $(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m 755 config/events.d/60.nfs $(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m 755 config/events.d/61.nfstickle $(DESTDIR)$(etcdir)/ctdb/events.d

View File

@ -42,6 +42,10 @@
# default is to not manage Samba
# CTDB_MANAGES_SAMBA=yes
# should ctdb manage starting/stopping the http service for you?
# default is to not manage http
# CTDB_MANAGES_HTTPD=yes
# should ctdb manage starting/stopping Winbind service?
# if left comented out then it will be autodetected based on smb.conf
# CTDB_MANAGES_WINBIND=yes

View File

@ -0,0 +1,28 @@
#!/bin/sh
# event strict to manage httpd in a cluster environment
. $CTDB_BASE/functions
loadconfig ctdb
[ "$CTDB_MANAGES_HTTPD" = "yes" ] || exit 0
cmd="$1"
shift
case $cmd in
startup)
service httpd stop > /dev/null 2>&1
service httpd start
;;
shutdown)
service httpd stop
;;
monitor)
ctdb_check_tcp_ports "http" 80
;;
esac
exit 0

View File

@ -97,6 +97,7 @@ fi
%{_sysconfdir}/ctdb/events.d/00.ctdb
%{_sysconfdir}/ctdb/events.d/10.interface
%{_sysconfdir}/ctdb/events.d/40.vsftpd
%{_sysconfdir}/ctdb/events.d/41.httpd
%{_sysconfdir}/ctdb/events.d/50.samba
%{_sysconfdir}/ctdb/events.d/60.nfs
%{_sysconfdir}/ctdb/events.d/61.nfstickle