summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/ulogd/files/ulogd.init-r2')
-rw-r--r--app-admin/ulogd/files/ulogd.init-r242
1 files changed, 42 insertions, 0 deletions
diff --git a/app-admin/ulogd/files/ulogd.init-r2 b/app-admin/ulogd/files/ulogd.init-r2
new file mode 100644
index 000000000000..c994507f9935
--- /dev/null
+++ b/app-admin/ulogd/files/ulogd.init-r2
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands="reload reopen"
+
+: ${ULOGD_BINARY:=/usr/sbin/ulogd}
+: ${ULOGD_PIDFILE:=/run/${SVCNAME}.pid}
+: ${ULOGD_WAIT:=200}
+: ${ULOGD_OPTS:=--daemon --uid ulogd --pidfile ${ULOGD_PIDFILE}}
+
+depend() {
+ before iptables ip6tables ebtables nftables firewall
+ after mysql postgresql
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start \
+ --exec ${ULOGD_BINARY} --pidfile ${ULOGD_PIDFILE} --wait ${ULOGD_WAIT} \
+ -- ${ULOGD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --pidfile ${ULOGD_PIDFILE}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME} configuration"
+ start-stop-daemon --signal USR1 --pidfile ${ULOGD_PIDFILE}
+ eend $?
+}
+
+reopen() {
+ ebegin "Reopening ${SVCNAME} logfiles"
+ start-stop-daemon --signal HUP --pidfile ${ULOGD_PIDFILE}
+ eend $?
+}