Lots of changes. In no particular order:
[distributedratelimiting.git] / ulogd.init
1 #!/bin/sh
2 #
3 # chkconfig: 345 81 19
4 # description: ulogd is the userspace logging daemon for netfilter/iptables
5 #
6
7
8 . /etc/rc.d/init.d/functions
9
10
11 function start()
12 {
13         printf "Starting %s: " "ulogd"
14         daemon /usr/sbin/ulogd -d
15         echo
16         touch /var/lock/subsys/ulogd
17 }
18
19
20 function stop()
21 {
22         printf "Stopping %s: " "ulogd"
23         killproc ulogd
24         echo
25         rm -f /var/lock/subsys/ulogd
26 }
27
28
29 function reload()
30 {
31         pid=`pidof ulogd`
32         if [ "x$pid" != "x" ]; then
33                 kill -HUP $pid 2>/dev/null
34         fi
35         touch /var/lock/subsys/ulogd
36 }
37
38
39 case "$1" in
40   start)
41         start
42         ;;
43   stop)
44         stop
45         ;;
46   restart)
47         stop
48         start
49         ;;
50   reload)
51         reload
52         ;;
53   status)
54         status ulogd
55         exit $?
56         ;;
57   *)
58         printf "Usage: %s {start|stop|status|restart|reload}\n" "ulogd"
59         exit 1
60 esac
61
62 exit 0