1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
#! /bin/sh
# /etc/init.d/exim
#
# Written by Miquel van Smoorenburg <miquels@drinkel.ow.org>.
# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.ai.mit.edu>.
# Modified for exim by Tim Cutts <timc@chiark.greenend.org.uk>
set -e
# Exit if exim runs from /etc/inetd.conf
if [ -f /etc/inetd.conf ] && grep -q "^ *\([0-9.]\+:\)\?smtp" /etc/inetd.conf; then
exit 0
fi
DAEMON=/usr/lib/exim/exim3
NAME=exim
test -x $DAEMON || exit 0
case "$1" in
start)
echo -n "Starting MTA: "
start-stop-daemon --start --pidfile /var/run/exim/exim.pid \
--exec $DAEMON -- -bd -q30m
echo "exim."
;;
stop)
echo -n "Stopping MTA: "
start-stop-daemon --stop --pidfile /var/run/exim/exim.pid \
--oknodo --retry 30 --exec $DAEMON
echo "exim."
;;
restart)
echo -n "Restarting MTA: "
start-stop-daemon --stop --pidfile /var/run/exim/exim.pid \
--oknodo --retry 30 --exec $DAEMON
start-stop-daemon --start --pidfile /var/run/exim/exim.pid \
--exec $DAEMON -- -bd -q30m
echo "exim."
;;
reload|force-reload)
echo "Reloading $NAME configuration files"
start-stop-daemon --stop --pidfile /var/run/exim/exim.pid \
--signal 1 --exec $DAEMON
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload}"
exit 1
;;
esac
exit 0
|