]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
added initscript for RedHat-style distributions
authorlaforge <laforge>
Sun, 20 May 2001 16:05:29 +0000 (16:05 +0000)
committerlaforge <laforge>
Sun, 20 May 2001 16:05:29 +0000 (16:05 +0000)
ulogd.init [new file with mode: 0755]

diff --git a/ulogd.init b/ulogd.init
new file mode 100755 (executable)
index 0000000..f56e3c5
--- /dev/null
@@ -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