--- www/varnish/files/varnishd.in.orig 2013-03-17 05:27:58.000000000 +0000 +++ www/varnish/files/varnishd.in 2013-03-17 05:29:25.000000000 +0000 @@ -43,9 +43,12 @@ # varnishd_group - unprivileged group for the child process. # default: "www" # +# varnishd_name - name used to construct instance directory. +# default: unset. +# # varnishd_flags - complete command line arguments. -# default if varnishd_config is unset: "-P ${varnishd_pidfile} -a ${varnishd_listen} -T ${varnishd_admin} -b ${varnishd_backend} -s ${varnishd_storage} -h ${varnishd_hash} -u ${varnishd_user} -g ${varnishd_group}" -# default if varnishd_config is set: "-P ${varnishd_pidfile} -a ${varnishd_listen} -T ${varnishd_admin} -f ${varnishd_config} -s ${varnishd_storage} -h ${varnishd_hash} -u ${varnishd_user} -g ${varnishd_group}" +# default if varnishd_config is unset: "-n ${varnishd_name} -P ${varnishd_pidfile} -a ${varnishd_listen} -T ${varnishd_admin} -b ${varnishd_backend} -s ${varnishd_storage} -h ${varnishd_hash} -u ${varnishd_user} -g ${varnishd_group}" +# default if varnishd_config is set: "-n ${varnishd_name} -P ${varnishd_pidfile} -a ${varnishd_listen} -T ${varnishd_admin} -f ${varnishd_config} -s ${varnishd_storage} -h ${varnishd_hash} -u ${varnishd_user} -g ${varnishd_group}" # # See varnishd(1) for a detailed overview of command-line options. # @@ -69,9 +72,9 @@ : ${varnishd_user:="www"} : ${varnishd_group:="www"} if [ -n "${varnishd_config}" ] ; then - : ${varnishd_flags:="-P ${varnishd_pidfile} -a ${varnishd_listen} -T ${varnishd_admin} -f ${varnishd_config} -s ${varnishd_storage} -h ${varnishd_hash} -u ${varnishd_user} -g ${varnishd_group}"} + : ${varnishd_flags:="${varnishd_name:+-n ${varnishd_name}} -P ${varnishd_pidfile} -a ${varnishd_listen} -T ${varnishd_admin} -f ${varnishd_config} -s ${varnishd_storage} -h ${varnishd_hash} -u ${varnishd_user} -g ${varnishd_group}"} else - : ${varnishd_flags:="-P ${varnishd_pidfile} -a ${varnishd_listen} -T ${varnishd_admin} -b ${varnishd_backend} -s ${varnishd_storage} -h ${varnishd_hash} -u ${varnishd_user} -g ${varnishd_group}"} + : ${varnishd_flags:="${varnishd_name:+-n ${varnishd_name}} -P ${varnishd_pidfile} -a ${varnishd_listen} -T ${varnishd_admin} -b ${varnishd_backend} -s ${varnishd_storage} -h ${varnishd_hash} -u ${varnishd_user} -g ${varnishd_group}"} fi # If we leave these set, rc.subr will su to them before starting --- www/varnish/files/varnishlog.in.orig 2013-03-17 05:30:37.000000000 +0000 +++ www/varnish/files/varnishlog.in 2013-03-17 05:31:22.000000000 +0000 @@ -43,7 +43,7 @@ : ${varnishlog_enable:="NO"} : ${varnishlog_pidfile:="/var/run/${name}.pid"} : ${varnishlog_file:="/var/log/varnish.log"} -: ${varnishlog_flags:="-P ${varnishlog_pidfile} -D -a -w ${varnishlog_file}"} +: ${varnishlog_flags:="${varnishd_name:+-n ${varnishd_name}} -P ${varnishlog_pidfile} -D -a -w ${varnishlog_file}"} pidfile=${varnishlog_pidfile} run_rc_command "$1" --- www/varnish/files/varnishncsa.in.orig 2015-03-23 11:27:36.000000000 -0500 +++ www/varnish/files/varnishncsa.in 2015-04-03 20:03:09.815688893 -0500 @@ -48,7 +48,7 @@ : ${varnishncsa_pidfile:="/var/run/${name}.pid"} : ${varnishncsa_file:="/var/log/${name}.log"} : ${varnishncsa_logformat:=""} -: ${varnishncsa_flags:="-P ${varnishncsa_pidfile} -D -a -c -w ${varnishncsa_file}${varnishncsa_logformat:+ -F \"$varnishncsa_logformat\"}"} +: ${varnishncsa_flags:="${varnishd_name:+-n ${varnishd_name}} -P ${varnishncsa_pidfile} -D -a -c -w ${varnishncsa_file}${varnishncsa_logformat:+ -F \"$varnishncsa_logformat\"}"} pidfile=${varnishncsa_pidfile} run_rc_command "$1"