updated on Fri Jan 6 08:01:17 UTC 2012
[aur-mirror.git] / iplist / rc.ipblock
blob67e04d248683834583f728ee0ff0ea91d7c5d541
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 case "$1" in
7 start)
8 stat_busy "Starting Iplist Daemon"
9 /usr/sbin/ipblock -s 2>/dev/null 1>&2
10 if [ $? -gt 0 ]; then
11 stat_fail
12 else
13 add_daemon ipblock
14 stat_done
17 stop)
18 stat_busy "Stopping Iplist Daemon"
19 /usr/sbin/ipblock -d
20 if [ $? -gt 0 ]; then
21 stat_fail
22 else
23 rm_daemon ipblock
24 stat_done
27 restart)
28 $0 stop
29 sleep 1
30 $0 start
32 update)
33 stat_busy "Downloading lists";
34 /usr/sbin/ipblock -u
35 stat_done
36 stat_busy "Converting lists to ipl format";
37 stat_done
38 /usr/sbin/ipblock -c
39 $0 restart
42 echo "usage: $0 {start|stop|restart|update}"
43 esac
44 exit 0