11
[ -n "$EX4DEBUG" ] && set -x
11
if [ -n "$EX4DEBUG" ]; then
12
echo "now debugging $0 $@"
17
QUEUERUNNER='combined'
20
PIDFILE="/var/run/exim4/exim.pid"
21
QRPIDFILE="/var/run/exim4/eximqr.pid"
22
[ -f /etc/default/exim4 ] && . /etc/default/exim4
14
25
UPEX4CONF="update-exim4.conf"
38
49
##test -x $DAEMON || exit 0
39
50
test -x /usr/lib/exim4/exim4 || exit 0
42
QUEUERUNNER='combined'
44
[ -f /etc/default/exim4 ] && . /etc/default/exim4
48
54
case ${QUEUERUNNER} in
50
start-stop-daemon --start --pidfile /var/run/exim4/exim.pid \
56
start-stop-daemon --start --pidfile "$PIDFILE" \
51
57
--exec $DAEMON -- -bd -q${QFLAGS}${QUEUEINTERVAL} \
52
58
${COMMONOPTIONS} ${QUEUERUNNEROPTIONS} ${SMTPLISTENEROPTIONS}
55
start-stop-daemon --start --pidfile /var/run/exim4/exim.pid \
61
start-stop-daemon --start --pidfile "$PIDFILE" \
56
62
--exec $DAEMON -- -bd ${SMTPLISTENEROPTIONS} ${COMMONOPTIONS}
57
start-stop-daemon --start --pidfile /var/run/exim4/eximqr.pid \
58
--exec $DAEMON -- -oP /var/run/exim4/eximqr.pid \
63
start-stop-daemon --start --pidfile "$QRPIDFILE" \
64
--exec $DAEMON -- -oP "$QRPIDFILE" \
59
65
-q${QFLAGS}${QUEUEINTERVAL} ${QUEUERUNNEROPTIONS} ${COMMONOPTIONS}
62
start-stop-daemon --start --pidfile /var/run/exim4/eximqr.pid \
63
--exec $DAEMON -- -oP /var/run/exim4/eximqr.pid \
68
start-stop-daemon --start --pidfile "$QRPIDFILE" \
69
--exec $DAEMON -- -oP "$QRPIDFILE" \
64
70
-q${QFLAGS}${QUEUEINTERVAL} ${QUEUERUNNEROPTIONS} ${COMMONOPTIONS}
67
start-stop-daemon --start --pidfile /var/run/exim4/exim.pid \
73
start-stop-daemon --start --pidfile "$PIDFILE" \
68
74
--exec $DAEMON -- -bd ${SMTPLISTENEROPTIONS}
77
83
# we try to kill eximqr and exim SMTP listener, no matter what
78
84
# ${QUEUERUNNER} is set to, we could have switched since starting.
79
[ -f /var/run/exim4/eximqr.pid ] && \
80
start-stop-daemon --stop --pidfile /var/run/exim4/eximqr.pid \
81
--oknodo --retry 30 --exec $DAEMON
82
[ -f /var/run/exim4/exim.pid ] && \
83
start-stop-daemon --stop --pidfile /var/run/exim4/exim.pid \
84
--oknodo --retry 30 --exec $DAEMON
85
rm -f /var/run/exim4/eximqr.pid /var/run/exim4/exim.pid
85
[ -f "$QRPIDFILE" ] && \
86
start-stop-daemon --stop --pidfile "$QRPIDFILE" \
87
--oknodo --retry 30 --exec $DAEMON
88
[ -f "$PIDFILE" ] && \
89
start-stop-daemon --stop --pidfile "$PIDFILE" \
90
--oknodo --retry 30 --exec $DAEMON
91
rm -f "$QRPIDFILE" "$PIDFILE"
90
96
case ${QUEUERUNNER} in
92
start-stop-daemon --stop --pidfile /var/run/exim4/exim.pid \
98
start-stop-daemon --stop --pidfile "$PIDFILE" \
93
99
--signal 1 --exec $DAEMON
96
start-stop-daemon --stop --pidfile /var/run/exim4/exim.pid \
102
start-stop-daemon --stop --pidfile "$PIDFILE" \
97
103
--signal 1 --exec $DAEMON
98
start-stop-daemon --stop --pidfile /var/run/exim4/eximqr.pid \
104
start-stop-daemon --stop --pidfile "$QRPIDFILE" \
99
105
--signal 1 --exec $DAEMON
113
for pid in $(pidof $NAME); do
114
if [ "$(readlink /proc/$pid/root)" == "/" ]; then
105
120
# check for valid configuration file