File: ulogd.init

package info (click to toggle)
ulogd 0.97-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 476 kB
  • ctags: 379
  • sloc: ansic: 2,099; sh: 231; makefile: 155
file content (61 lines) | stat: -rwxr-xr-x 739 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/sh
#
# chkconfig: 345 81 19
# description: ulogd is the userspace logging daemon for netfilter/iptables
#


. /etc/rc.d/init.d/functions


function start()
{
	gprintf "Starting %s: " "ulogd"
	daemon /usr/sbin/ulogd
	echo
	touch /var/lock/subsys/ulogd
}


function stop()
{
	gprintf "Stopping %s: " "ulogd"
	killprocparent ulogd
	echo
	rm -f /var/lock/subsys/ulogd
}


function reload()
{
	pid=`pidoffather ulogd`
	if [ "x$pid" != "x" ]; then
		kill -HUP $pid 2>/dev/null
	fi
	touch /var/lock/subsys/ulogd
}


case "$1" in
  start)
	start
	;;
  stop)
  	stop
	;;
  restart)
	stop
	start
	;;
  reload)
	reload
	;;
  status)
	status ulogd
	;;
  *)
	gprintf "Usage: %s {start|stop|status|restart|reload}\n" "ulogd"
	exit 1
esac

exit 0