You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-admin/metalog/files/metalog.initd

43 lines
708 B

#!/sbin/openrc-run
# 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 $?
}