diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2009-10-13 18:51:10 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2009-10-13 18:51:10 +0000 |
commit | 7032b99a2848b30923f836fac79a5ae30ad26f46 (patch) | |
tree | 68b2a2d6e962af43c22c96f6a40f38309577eafc /www/varnish2/files/varnishncsa.in | |
parent | Simple facade or abstraction for various logging frameworks (diff) |
Reorganize the rc scripts; there were several things about the old ones
that simply didn't make sense. Add a pkg-message containing a very brief
quick-start guide and a warning to existing users about the rc changes.
Notes
Notes:
svn path=/head/; revision=242785
Diffstat (limited to 'www/varnish2/files/varnishncsa.in')
-rw-r--r-- | www/varnish2/files/varnishncsa.in | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/www/varnish2/files/varnishncsa.in b/www/varnish2/files/varnishncsa.in index 46b113f50e4c..75a6d2449a88 100644 --- a/www/varnish2/files/varnishncsa.in +++ b/www/varnish2/files/varnishncsa.in @@ -8,32 +8,42 @@ # KEYWORD: shutdown # -# Add the following lines to /etc/rc.conf to enable varnishncsa: +# Add the following line to /etc/rc.conf to enable varnishncsa: # -#varnishncsa_enable="YES" +# varnishncsa_enable="YES" # # Configuration variables and their default values: # -#varnishncsa_file=${varnishncsa_file:-"/var/log/varnish-ncsa.log"} -#varnishncsa_flags=${varnishncsa_flags:-"-D -P ${pidfile} -a -w ${varnishncsa_file}"} +# varnishncsa_pidfile - full path to the PID file. +# default: "/var/run/varnishncsa.pid" +# +# varnishncsa_file - full path to the log file. +# default: "/var/log/varnishncsa.log" +# +# varnishncsa_flags - command line arguments. +# default: "-D -P ${varnishncsa_pidfile} -a -c -w ${varnishncsa_file}" +# +# Add the following line to /etc/newsyslog.conf to rotate the log file +# once a day: +# +# /var/log/varnishncsa.log 640 7 * @T00 JB /var/run/varnishncsa.pid # # See varnishncsa(1) for a detailed overview of command-line options. # . %%RC_SUBR%% -name=varnishncsa +name="varnishncsa" rcvar=`set_rcvar` -command="%%PREFIX%%/bin/varnishncsa" -pidfile="/var/run/${name}.pid" +command="%%PREFIX%%/bin/${name}" # read configuration and set defaults load_rc_config ${name} -: ${varnishncsa_enable="NO"} -: ${varnishncsa_file="/var/log/varnish-ncsa.log"} -: ${varnishncsa_flags="-P ${pidfile} -D -a -w ${varnishncsa_file}"} - -load_rc_config ${name} +: ${varnishncsa_enable:="NO"} +: ${varnishncsa_pidfile:="/var/run/${name}.pid"} +: ${varnishncsa_file:="/var/log/${name}.log"} +: ${varnishncsa_flags:="-P ${varnishncsa_pidfile} -D -a -c -w ${varnishncsa_file}"} +pidfile=${varnishncsa_pidfile} run_rc_command "$1" |