From: laforge Date: Sun, 20 May 2001 16:05:29 +0000 (+0000) Subject: added initscript for RedHat-style distributions X-Git-Tag: ulogd-2.0.0beta2~475 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89f2a6ee26db5fddca259000b67e4990f64e8b72;p=thirdparty%2Fulogd2.git added initscript for RedHat-style distributions --- diff --git a/ulogd.init b/ulogd.init new file mode 100755 index 0000000..f56e3c5 --- /dev/null +++ b/ulogd.init @@ -0,0 +1,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