updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / sid-milter / sid-filter
blob552dde376b7a88d2b783193a48188837607f7d4f
1 #!/bin/bash
3 # general config
4 . /etc/rc.conf
5 . /etc/rc.d/functions
6 . /etc/conf.d/sid-filter.conf
8 PID=`pidof -o %PPID /usr/sbin/sid-filter`
9 case "$1" in
10 start)
11 stat_busy "Starting SenderID Milter"
12 if [ -z "$PID" ]; then
13 /usr/sbin/sid-filter $SID_FILTER > /dev/null &
15 if [ ! -z "$PID" -o $? -gt 0 ]; then
16 stat_fail
17 else
18 add_daemon sid-filter
19 stat_done
22 stop)
23 stat_busy "Stopping SenderID Milter"
24 [ ! -z "$PID" ] && kill $PID &> /dev/null
25 if [ $? -gt 0 ]; then
26 stat_fail
27 else
28 rm_daemon sid-filter
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