SOURCES: pound.sysconfig (NEW), pound.init - multiple instance sup...
glen
glen at pld-linux.org
Tue Sep 11 13:06:54 CEST 2007
Author: glen Date: Tue Sep 11 11:06:54 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- multiple instance support
---- Files affected:
SOURCES:
pound.sysconfig (NONE -> 1.1) (NEW), pound.init (1.8 -> 1.9)
---- Diffs:
================================================================
Index: SOURCES/pound.sysconfig
diff -u /dev/null SOURCES/pound.sysconfig:1.1
--- /dev/null Tue Sep 11 13:06:54 2007
+++ SOURCES/pound.sysconfig Tue Sep 11 13:06:49 2007
@@ -0,0 +1,4 @@
+# Customized settings for Pound
+
+# List of instances to start. Configs are searched /etc/pound/$INSTANCE.cfg
+#POUND_INSTANCES="pound"
================================================================
Index: SOURCES/pound.init
diff -u SOURCES/pound.init:1.8 SOURCES/pound.init:1.9
--- SOURCES/pound.init:1.8 Tue Sep 11 12:16:18 2007
+++ SOURCES/pound.init Tue Sep 11 13:06:49 2007
@@ -12,6 +12,9 @@
# Get network config
. /etc/sysconfig/network
+# List of instances to start.
+POUND_INSTANCES="pound"
+
# Get service config
[ -f /etc/sysconfig/pound ] && . /etc/sysconfig/pound
@@ -26,26 +29,30 @@
fi
start() {
- # Check if the service is already running?
- if [ ! -f /var/lock/subsys/pound ]; then
- msg_starting pound
- daemon pound -f /etc/pound/pound.cfg
- RETVAL=$?
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/pound
- else
- msg_already_running pound
- fi
+ for instance in $POUND_INSTANCES; do
+ # Check if the service is already running?
+ if [ ! -f /var/lock/subsys/pound-$instance ]; then
+ msg_starting "Pound ($instance)"
+ daemon pound -f /etc/pound/$instance.cfg -p /var/run/pound/$instance.pid
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/pound-$instance
+ else
+ msg_already_running "Pound ($instance)"
+ fi
+ done
}
stop() {
# Stop daemons.
- if [ -f /var/lock/subsys/pound ]; then
- msg_stopping pound
- killproc pound
- rm -f /var/lock/subsys/pound > /dev/null 2>&1
- else
- msg_not_running pound
- fi
+ for instance in $POUND_INSTANCES; do
+ if [ -f /var/lock/subsys/pound-$instance ]; then
+ msg_stopping "Pound ($instance)"
+ killproc --pidfile pound/$instance.pid pound
+ rm -f /var/lock/subsys/pound-$instance > /dev/null 2>&1
+ else
+ msg_not_running "Pound ($instance)"
+ fi
+ done
}
RETVAL=0
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/pound.init?r1=1.8&r2=1.9&f=u
More information about the pld-cvs-commit
mailing list