updated on Thu Jan 5 13:17:10 UTC 2012
[aur-mirror.git] / dkim-milter / dkim
blob4983336acc1e506b4f6f9fce9eeb60954df931f9
1 #!/bin/bash
3 # general config
4 . /etc/rc.conf
5 . /etc/rc.d/functions
6 . /etc/conf.d/dkim-filter.conf
8 PID=`pidof -o %PPID /usr/sbin/dkim-filter`
9 case "$1" in
10 start)
11 stat_busy "Starting DKIM Filter"
12 if [ -z "$PID" ]; then
13 /usr/sbin/dkim-filter $DKIM_FILTER > /dev/null &
15 if [ ! -z "$PID" -o $? -gt 0 ]; then
16 stat_fail
17 else
18 add_daemon dkim
19 stat_done
22 stop)
23 stat_busy "Stopping DKIM Filter"
24 [ ! -z "$PID" ] && kill $PID &> /dev/null
25 if [ $? -gt 0 ]; then
26 stat_fail
27 else
28 rm_daemon dkim
29 stat_done
32 restart)
33 $0 stop
34 sleep 1
35 $0 start
38 echo "usage: $0 {start|stop|restart}"
40 esac
41 exit 0