summaryrefslogtreecommitdiff
path: root/network/exim/contrib/rc.exim
blob: 72ff9cccd1d9c4d70567bedc827dfbd7cde04a62 (plain)
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
#!/bin/bash

# Run SMTP listening daemon, do queue runs every 10 mins.
EXIM_ARGS="-bd -q10m"

# Read alternative EXIM_ARGS line from /etc/default/exim.
test -f /etc/default/exim && source /etc/default/exim

case "$1" in
  start)
    echo "starting exim"
    /usr/sbin/exim $EXIM_ARGS
    ;;
  stop)
    echo "stopping exim"
    pkill -F /var/run/exim.pid
    ;;
  reload)
    echo "reloading exim"
    pkill -F /var/run/exim.pid -HUP
    ;;
  restart)
    $0 stop; sleep 2; $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|reload|restart}"
    ;;
esac