]> git.pld-linux.org Git - packages/ulogd.git/blame - ulogd.init
- cosmetics
[packages/ulogd.git] / ulogd.init
CommitLineData
91af2408
JR
1#!/bin/sh
2#
3# ulogd Starts ulogd.
4#
986a8767 5# chkconfig: 2345 91 91
91af2408
JR
6# description: ulogd is the userland packect logger for iptables ULOG target.
7
8# Source function library
9. /etc/rc.d/init.d/functions
10
11# Get network config
12. /etc/sysconfig/network
13
14[ -f /usr/sbin/ulogd ] || exit 0
15
16# Get service config
de45c934 17if [ -f /etc/sysconfig/ulogd ]; then
0b1d7823 18 . /etc/sysconfig/ulogd
91af2408
JR
19fi
20
9ae3c9ed 21RETVAL=0
91af2408
JR
22# See how we were called.
23case "$1" in
24 start)
25 # Check if the service is already running?
26 if [ ! -f /var/lock/subsys/ulogd ]; then
0b1d7823 27 msg_starting ulogd
91af2408
JR
28 daemon ulogd
29 RETVAL=$?
30 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ulogd
31 else
0b1d7823 32 msg_already_running ulogd
91af2408
JR
33 fi
34 ;;
d8257818 35 stop)
91af2408 36 if [ -f /var/lock/subsys/ulogd ]; then
0b1d7823 37 msg_stopping ulogd
91af2408
JR
38 killproc ulogd
39 rm -f /var/lock/subsys/ulogd >/dev/null 2>&1
40 else
cdcd4235 41 msg_not_running ulogd
d8257818 42 fi
91af2408
JR
43 ;;
44 status)
45 status ulogd
9ae3c9ed 46 exit $?
91af2408 47 ;;
9ae3c9ed 48 restart|force-reload)
91af2408
JR
49 $0 stop
50 $0 start
0b1d7823 51 exit $?
91af2408 52 ;;
91af2408 53 *)
9ae3c9ed 54 msg_usage "$0 {start|stop|restart|force-reload|status}"
55 exit 3
91af2408
JR
56esac
57
58exit $RETVAL
This page took 0.118061 seconds and 4 git commands to generate.