44 lines
1.1 KiB
Text
44 lines
1.1 KiB
Text
#!/sbin/runscript
|
|
# Copyright 1999-2008 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/app-admin/metalog/files/metalog.initd,v 1.4 2009/01/02 07:56:34 vapier Exp $
|
|
|
|
opts="buffer unbuffer"
|
|
|
|
PIDFILE=/run/metalog.pid
|
|
|
|
depend() {
|
|
need localmount
|
|
use clock hostname
|
|
after bootmisc
|
|
provide logger
|
|
}
|
|
|
|
start() {
|
|
ebegin "Starting metalog"
|
|
start-stop-daemon --start --exec /usr/sbin/metalog \
|
|
--pidfile "${PIDFILE}" \
|
|
-- --daemonize --pidfile="${PIDFILE}" ${METALOG_OPTS}
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
ebegin "Stopping metalog"
|
|
start-stop-daemon --stop --exec /usr/sbin/metalog \
|
|
--pidfile "${PIDFILE}"
|
|
eend $?
|
|
}
|
|
|
|
buffer() {
|
|
ebegin "Enabling log buffering"
|
|
start-stop-daemon --stop --oknodo --signal USR2 \
|
|
--exec /usr/sbin/metalog --pidfile "${PIDFILE}"
|
|
eend $?
|
|
}
|
|
|
|
unbuffer() {
|
|
ebegin "Disabling log buffering"
|
|
start-stop-daemon --stop --oknodo --signal USR1 \
|
|
--exec /usr/sbin/metalog --pidfile "${PIDFILE}"
|
|
eend $?
|
|
}
|