diff options
Diffstat (limited to 'app-admin/metalog/files/metalog.initd')
-rwxr-xr-x | app-admin/metalog/files/metalog.initd | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/app-admin/metalog/files/metalog.initd b/app-admin/metalog/files/metalog.initd new file mode 100755 index 000000000000..a921c0d574d3 --- /dev/null +++ b/app-admin/metalog/files/metalog.initd @@ -0,0 +1,42 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_started_commands="buffer unbuffer" + +PIDFILE=/var/run/metalog.pid + +depend() { + need localmount + use clock hostname + after bootmisc + provide logger +} + +ssd() { start-stop-daemon --exec /usr/sbin/metalog --pidfile "${PIDFILE}" "$@" ; } + +start() { + ebegin "Starting metalog" + ssd --start -- \ + --daemonize --pidfile="${PIDFILE}" ${METALOG_OPTS} + eend $? +} + +stop() { + ebegin "Stopping metalog" + ssd --stop + eend $? +} + +buffer() { + ebegin "Enabling log buffering" + ssd --signal USR2 + eend $? +} + +unbuffer() { + ebegin "Disabling log buffering" + ssd --signal USR1 + eend $? +} |