SOURCES: haproxy.init - checkconfig and reload targets added
blues
blues at pld-linux.org
Tue Apr 17 19:51:13 CEST 2007
Author: blues Date: Tue Apr 17 17:51:13 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- checkconfig and reload targets added
---- Files affected:
SOURCES:
haproxy.init (1.2 -> 1.3)
---- Diffs:
================================================================
Index: SOURCES/haproxy.init
diff -u SOURCES/haproxy.init:1.2 SOURCES/haproxy.init:1.3
--- SOURCES/haproxy.init:1.2 Sun Apr 15 18:56:33 2007
+++ SOURCES/haproxy.init Tue Apr 17 19:51:08 2007
@@ -30,6 +30,10 @@
exit 0
fi
+checkconfig() {
+ /usr/sbin/haproxy -q -c -f /etc/haproxy/haproxy.cfg || exit 1
+}
+
start() {
if [ ! -f /var/lock/subsys/haproxy ]; then
msg_starting haproxy
@@ -61,15 +65,27 @@
stop
;;
restart|force-reload)
+ checkconfig
stop
start
;;
+ reload)
+ if [ -f /var/lock/subsys/haproxy ]; then
+ checkconfig
+ msg_reloading haproxy
+ daemon haproxy -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid -st $(</var/run/haproxy.pid)
+ RETVAL=$?
+ else
+ msg_not_running haproxy
+ exit 7
+ fi
+ ;;
status)
status haproxy
exit $?
;;
*)
- msg_usage "$0 {start|stop|restart|force-reload|status}"
+ msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
exit 3
esac
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/haproxy.init?r1=1.2&r2=1.3&f=u
More information about the pld-cvs-commit
mailing list