From ed36e5b03b2da9d01c62f58c0e75a4f8ff4d66e0 Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Sun, 17 Mar 2013 01:39:33 -0400 Subject: [PATCH] www/varnish: patch rcscripts to add -n option variable --- ...ww_varnish_add_name_var_to_rcscripts.patch | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 cdn/patch/www_varnish_add_name_var_to_rcscripts.patch diff --git a/cdn/patch/www_varnish_add_name_var_to_rcscripts.patch b/cdn/patch/www_varnish_add_name_var_to_rcscripts.patch new file mode 100644 index 0000000..7dd3fa1 --- /dev/null +++ b/cdn/patch/www_varnish_add_name_var_to_rcscripts.patch @@ -0,0 +1,51 @@ +--- 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 2013-03-17 05:32:02.000000000 +0000 ++++ www/varnish/files/varnishncsa.in 2013-03-17 05:32:24.000000000 +0000 +@@ -43,7 +43,7 @@ + : ${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}"} ++: ${varnishncsa_flags:="${varnishd_name:+-n ${varnishd_name}} -P ${varnishncsa_pidfile} -D -a -c -w ${varnishncsa_file}"} + + pidfile=${varnishncsa_pidfile} + run_rc_command "$1" -- 2.42.0