3 # eximqd Start/Stop eximq supervisor
6 # description: eximq - exim queue runners supervisor
10 # Source function library
11 . /etc/rc.d/init.d/functions
14 . /etc/sysconfig/network
16 EXIMQ_CONFIG=/etc/mail/eximq.args
19 [ -f /etc/sysconfig/exim ] && . /etc/sysconfig/exim
20 [ -f /etc/sysconfig/eximq ] && . /etc/sysconfig/eximq
22 if [ -n "$QUEUE" ]; then
23 echo "eximq requires QUEUE in /etc/sysconfig/exim to be empty" >&2
28 # See how we were called.
31 # Check if the service is already running?
32 if [ ! -f /var/lock/subsys/eximq ]; then
34 grep -v -e '^[[:space:]]*$' -e '^#' $EXIMQ_CONFIG | while read args; do
35 n=$(printf '%02d' $(($n+1)))
36 msg_starting "eximq $n daemon"
37 daemon --user exim /usr/sbin/eximq.pl --pidfile /var/run/eximq/eximq.$n.pid --daemon $args
40 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/eximq
42 msg_already_running eximq
47 if [ -f /var/lock/subsys/eximq ]; then
49 grep -v -e '^[[:space:]]*$' -e '^#' $EXIMQ_CONFIG | while read args; do
50 n=$(printf '%02d' $(($n+1)))
51 msg_stopping "eximq $n daemon"
52 killproc --pidfile /var/run/eximq/eximq.$n.pid eximq.pl
54 rm -f /var/lock/subsys/eximq >/dev/null 2>&1
69 msg_usage "$0 {start|stop|restart|status}"