Date: Fri, 26 Apr 2019 16:53:26 +0000 (UTC) From: Mark Felder <feld@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r500118 - in head/www/varnish6: . files Message-ID: <201904261653.x3QGrQsF097398@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: feld Date: Fri Apr 26 16:53:26 2019 New Revision: 500118 URL: https://svnweb.freebsd.org/changeset/ports/500118 Log: www/varnish6: Port improvements - Fix problem when defining multiple cache storage - Add syslog output support for varnishncsa logging Submitted by: iscream@nugae.org Modified: head/www/varnish6/Makefile head/www/varnish6/files/varnishd.in head/www/varnish6/files/varnishncsa.in Modified: head/www/varnish6/Makefile ============================================================================== --- head/www/varnish6/Makefile Fri Apr 26 16:14:44 2019 (r500117) +++ head/www/varnish6/Makefile Fri Apr 26 16:53:26 2019 (r500118) @@ -3,7 +3,7 @@ PORTNAME= varnish PORTVERSION= 6.2.0 DISTVERSIONPREFIX= varnish- -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www PKGNAMESUFFIX= 6 Modified: head/www/varnish6/files/varnishd.in ============================================================================== --- head/www/varnish6/files/varnishd.in Fri Apr 26 16:14:44 2019 (r500117) +++ head/www/varnish6/files/varnishd.in Fri Apr 26 16:53:26 2019 (r500118) @@ -83,7 +83,7 @@ varnishd_checkconfig() echo "${name}: nothing to check, no configuration file defined, builtin VCL used" else echo "Performing sanity check on ${name} configuration:" - if eval ${command} -C -f "${varnishd_config}" 2> /dev/null ; then + if eval ${command} ${varnishd_flags} -C -f "${varnishd_config}" 2> /dev/null ; then echo "${name}: the configuration file ${varnishd_config} syntax is ok" else err 1 "${name}: the configuration file ${varnishd_config} syntax is NOT ok" Modified: head/www/varnish6/files/varnishncsa.in ============================================================================== --- head/www/varnish6/files/varnishncsa.in Fri Apr 26 16:14:44 2019 (r500117) +++ head/www/varnish6/files/varnishncsa.in Fri Apr 26 16:53:26 2019 (r500118) @@ -20,8 +20,12 @@ # varnishncsa_file - full path to the log file. # default: "/var/log/varnishncsa.log" # +# varnishncsa_log_method - log to file or syslog +# default: "-D -a -w ${varnishncsa_file}" +# varnishncsa_syslog="YES": '| /usr/bin/logger -t varnish -p daemon.info &' +# # varnishncsa_flags - command line arguments. -# default: "-t off -P ${varnishncsa_pidfile} -D -a -w ${varnishncsa_file}${varnishncsa_logformat:+ -F \"$varnishncsa_logformat\"}" +# default: "-t off -P ${varnishncsa_pidfile} ${varnishncsa_logformat:+ -F \"$varnishncsa_logformat\"} ${varnishncsa_log_method}" # # varnishncsa_logformat - log file format. # default: "" (uses varnishncsa's default format) @@ -45,11 +49,17 @@ load_rc_config ${name} : ${varnishncsa_enable:=NO} : ${varnishncsa_pidfile=/var/run/${name}.pid} : ${varnishncsa_file=/var/log/${name}.log} -: ${varnishncsa_flags="-t off -P ${varnishncsa_pidfile} -D -a -w ${varnishncsa_file} ${varnishncsa_logformat:+-F \"$varnishncsa_logformat\"}"} +: ${varnishncsa_flags="-t off -P ${varnishncsa_pidfile} ${varnishncsa_logformat:+-F \"$varnishncsa_logformat\"}"} +: ${varnishncsa_syslog:=NO} -procname="%%PREFIX%%/bin/${name}" -command="/usr/sbin/daemon" -command_args="-f -u varnishlog ${procname} ${varnishncsa_flags}" +if checkyesno varnishncsa_syslog; then + varnishncsa_log_method='| /usr/bin/logger -t varnish -p daemon.info &' +else + varnishncsa_log_method="-D -a -w ${varnishncsa_file}" +fi + +command="%%PREFIX%%/bin/${name}" +command_args="${varnishncsa_flags} ${varnishncsa_log_method}" pidfile=${varnishncsa_pidfile} start_precmd=precmd
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904261653.x3QGrQsF097398>