updated on Mon Jan 16 00:01:41 UTC 2012
[aur-mirror.git] / exim-mysql / exim
blob8e9640b3200816aa9f63d35dc66474c5411c11a4
1 #!/bin/bash
3 # source application-specific settings
4 [ -f /etc/conf.d/exim ] && . /etc/conf.d/exim
6 # general config
7 . /etc/rc.conf
8 . /etc/rc.d/functions
10 PID=`pidof -o %PPID /usr/sbin/exim`
12 case "$1" in
13 start)
14 stat_busy "Starting Exim"
15 [ -z "$PID" ] && /usr/sbin/exim $EXIM_ARGS
16 if [ $? -gt 0 ]; then
17 stat_fail
18 else
19 add_daemon exim
20 stat_done
23 stop)
24 stat_busy "Stopping Exim"
25 [ ! -z "$PID" ] && kill $PID &> /dev/null
26 if [ $? -gt 0 ]; then
27 stat_fail
28 else
29 rm /var/run/exim.pid
30 rm_daemon exim
31 stat_done
34 restart)
35 $0 stop
36 sleep 2
37 $0 start
40 echo "usage: $0 {start|stop|restart}"
41 esac
42 exit 0