updated on Tue Jan 17 12:00:36 UTC 2012
[aur-mirror.git] / opendkim / opendkim.rc
blobf87bfcfc9fbea442910c5590deedf64f0bdc41b3
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
5 . /etc/conf.d/opendkim
7 PID=`pidof -o %PPID /usr/sbin/opendkim`
8 case "$1" in
9 start)
10 stat_busy "Starting OpenDKIM filter"
11 if [ -z "$PID" ]; then
12 /usr/sbin/opendkim $OPENDKIM_FILTER > /dev/null &
14 if [ ! -z "$PID" -o $? -gt 0 ]; then
15 stat_fail
16 else
17 add_daemon dkim
18 stat_done
21 stop)
22 stat_busy "Stopping OpenDKIM filter"
23 [ ! -z "$PID" ] && kill $PID &> /dev/null
24 if [ $? -gt 0 ]; then
25 stat_fail
26 else
27 rm_daemon dkim
28 stat_done
31 restart)
32 $0 stop
33 sleep 1
34 $0 start
37 echo "usage: $0 {start|stop|restart}"
38 esac
39 exit 0