summaryrefslogtreecommitdiff
path: root/user/metalog/metalog.initd-r1
diff options
context:
space:
mode:
authorRandy McCaskill <randy@mccaskill.us>2020-02-25 00:45:53 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2020-02-25 00:45:53 +0000
commitdbe69f4ba255bbacc376f038d862fa6945bea52b (patch)
treea690a0fe12e20a2acb4a7e48511e1397f7509046 /user/metalog/metalog.initd-r1
parent800cfeb6fc2dadb5eca69afde9a720fd5694c1af (diff)
downloadpackages-dbe69f4ba255bbacc376f038d862fa6945bea52b.tar.gz
packages-dbe69f4ba255bbacc376f038d862fa6945bea52b.tar.bz2
packages-dbe69f4ba255bbacc376f038d862fa6945bea52b.tar.xz
packages-dbe69f4ba255bbacc376f038d862fa6945bea52b.zip
Adding metalog and autoconf-archive (dependency).
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 ${?}
+}