summaryrefslogtreecommitdiff
path: root/user/metalog/metalog.initd-r1
diff options
context:
space:
mode:
authorCyberLeo <cyberleo@cyberleo.net>2020-03-28 05:45:52 -0500
committerCyberLeo <cyberleo@cyberleo.net>2020-03-28 05:45:52 -0500
commit9297468fa579836e3a6a381b798feb6b78217c2d (patch)
tree53168212f427afbcf0693b534530a4af803152e9 /user/metalog/metalog.initd-r1
parenta63cc05c53a6f4c22422dc8c69808b14d87a6f6e (diff)
parentda5a69b65a8791fffa6e93366ee585f87eff136d (diff)
downloadpackages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.gz
packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.bz2
packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.xz
packages-9297468fa579836e3a6a381b798feb6b78217c2d.zip
Merge branch 'master' into zfs
Diffstat (limited to 'user/metalog/metalog.initd-r1')
-rw-r--r--user/metalog/metalog.initd-r128
1 files changed, 28 insertions, 0 deletions
diff --git a/user/metalog/metalog.initd-r1 b/user/metalog/metalog.initd-r1
new file mode 100644
index 000000000..bb947bdad
--- /dev/null
+++ b/user/metalog/metalog.initd-r1
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile="${PIDFILE:-/run/metalog.pid}"
+command="/usr/sbin/metalog"
+command_args="--pidfile=${pidfile} --daemonize ${METALOG_OPTS}"
+
+extra_started_commands="buffer unbuffer"
+
+depend() {
+ need localmount
+ use clock hostname
+ after bootmisc
+ provide logger
+}
+
+buffer() {
+ ebegin "Enabling log buffering"
+ start-stop-daemon --exec "${command}" --signal USR2 --pidfile "${pidfile}"
+ eend ${?}
+}
+
+unbuffer() {
+ ebegin "Disabling log buffering"
+ start-stop-daemon --exec "${command}" --signal USR1 --pidfile "${pidfile}"
+ eend ${?}
+}