vp-build/templates/metalog/files/metalog.rc
Juan RP 77ef4aad39 metalog: fix openrc service to send proper signals. Bump revision.
--HG--
extra : convert_revision : ffd26b9da63cfbaf4af5182c9b8dc0c9a9d81cb5
2009-09-18 16:05:18 +02:00

29 lines
486 B
Plaintext

#!/sbin/runscript
extra_commands="buffer unbuffer"
command=/usr/sbin/metalog
pidfile=${metalog_pid:-/var/run/metalog.pid}
command_args="$metalog_flags --daemonize --pidfile $pidfile"
depend()
{
provide logger
need localmount
use clock hostname
after bootmisc
}
buffer()
{
ebegin "Enabling log buffering"
start-stop-daemon --signal USR1 --pidfile $pidfile
eend $?
}
unbuffer()
{
ebegin "Disabling log buffering"
start-stop-daemon --signal USR2 --pidfile $pidfile
eend $?
}