blob: 7d07528e7b52d84730ecd619afcd0e311241914a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: varnishlog
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable varnishlog:
#
#varnishlog_enable="YES"
#
# Configuration variables and their default values:
#
#varnishlog_file=${varnishlog_file:-"/var/log/varnish.log"}
#varnishlog_flags=${varnishlog_flags:-"-D -P ${pidfile} -a -w ${varnishlog_file}"}
#
# See varnishlog(1) for a detailed overview of command-line options.
#
. %%RC_SUBR%%
name=varnishlog
rcvar=`set_rcvar`
command="%%PREFIX%%/bin/varnishlog"
pidfile="/var/run/${name}.pid"
# read configuration and set defaults
load_rc_config ${name}
: ${varnishlog_enable="NO"}
: ${varnishlog_file="/var/log/varnish.log"}
: ${varnishlog_flags="-P ${pidfile} -D -a -w ${varnishlog_file}"}
load_rc_config ${name}
run_rc_command "$1"
|