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/www-servers/varnish/files/varnishlog.initd

32 lines
707 B

#!/sbin/openrc-run
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
VARNISHLOG_PID=${VARNISHLOG_PID:-/run/${SVCNAME}.pid}
command="${VARNISHLOG:-/usr/bin/varnishlog}"
command_args="-D -P ${VARNISHLOG_PID} ${VARNISHLOG_OPTS}"
pidfile="${VARNISHLOG_PID}"
extra_started_commands="reload rotate flush"
description_rotate="Rotate the log file"
description_flush="Flush any outstanding transactions"
rotate() {
ebegin "Rotating log file"
start-stop-daemon -p ${VARNISHLOG_PID} -s SIGHUP
eend $?
}
flush() {
ebegin "Flushing any outstanding transactions"
start-stop-daemon -p ${VARNISHLOG_PID} -s SIGUSR1
eend $?
}
reload() {
flush
rotate
}