SOURCES: haproxy.init - functions
blues
blues at pld-linux.org
Sun Apr 15 18:56:38 CEST 2007
Author: blues Date: Sun Apr 15 16:56:38 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- functions
---- Files affected:
SOURCES:
haproxy.init (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SOURCES/haproxy.init
diff -u SOURCES/haproxy.init:1.1 SOURCES/haproxy.init:1.2
--- SOURCES/haproxy.init:1.1 Fri Jul 1 02:20:55 2005
+++ SOURCES/haproxy.init Sun Apr 15 18:56:33 2007
@@ -30,11 +30,7 @@
exit 0
fi
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
- # Check if the service is already running?
+start() {
if [ ! -f /var/lock/subsys/haproxy ]; then
msg_starting haproxy
daemon haproxy -D -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid
@@ -43,9 +39,9 @@
else
msg_already_running haproxy
fi
- ;;
- stop)
- # Stop daemons.
+}
+
+stop() {
if [ -f /var/lock/subsys/haproxy ]; then
msg_stopping haproxy
killproc --pidfile /var/run/haproxy.pid haproxy
@@ -53,11 +49,20 @@
else
msg_not_running haproxy
fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
restart|force-reload)
- $0 stop
- $0 start
- exit $?
+ stop
+ start
;;
status)
status haproxy
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/haproxy.init?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list