2014-03-06 17:54:50 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Start/stop exim
|
|
|
|
#
|
|
|
|
|
2020-03-02 11:19:02 +01:00
|
|
|
PIDFILE=/var/run/exim/exim.pid
|
2014-03-06 17:54:50 +01:00
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
echo "Starting exim..."
|
2020-03-02 11:19:02 +01:00
|
|
|
if [ ! -d /var/log/exim ]; then
|
|
|
|
mkdir -p /var/log/exim
|
|
|
|
chown exim:mail /var/log/exim
|
|
|
|
fi
|
|
|
|
if [ ! -d /var/run/exim ]; then
|
|
|
|
mkdir -p /var/run/exim
|
|
|
|
chown root:mail /var/run/exim
|
|
|
|
fi
|
2014-03-06 17:54:50 +01:00
|
|
|
start-stop-daemon -S -x exim -- -bd
|
|
|
|
;;
|
|
|
|
stop)
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Stopping exim..."
|
2014-03-06 17:54:50 +01:00
|
|
|
start-stop-daemon -K -o -p $PIDFILE
|
|
|
|
;;
|
|
|
|
restart|reload)
|
|
|
|
"$0" stop
|
|
|
|
"$0" start
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit $?
|