#!/bin/sh # # chkconfig: 345 81 19 # description: ulogd is the userspace logging daemon for netfilter/iptables # . /etc/rc.d/init.d/functions function start() { pid=`pidof ulogd` if [ "x$pid" == "x" ]; then echo -n $"Starting $prog: " daemon /usr/sbin/ulogd -d || exit $? echo touch /var/lock/subsys/ulogd else echo $"$prog is already running." fi } function stop() { pid=`pidof ulogd` if [ "x$pid" != "x" ]; then echo -n $"Stopping $prog: " killproc ulogd || exit $? echo rm -f /var/lock/subsys/ulogd else echo $"$prog is already stopped." fi } function reload() { pid=`pidof 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 exit $? ;; *) printf "Usage: %s {start|stop|status|restart|reload}\n" "ulogd" exit 1 esac exit 0