Changeset View
Changeset View
Standalone View
Standalone View
www/varnish4/files/varnishd.in
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | |||||
: ${varnishd_listen:=":80"} | : ${varnishd_listen:=":80"} | ||||
: ${varnishd_admin:="localhost:81"} | : ${varnishd_admin:="localhost:81"} | ||||
: ${varnishd_backend:="localhost:8080"} | : ${varnishd_backend:="localhost:8080"} | ||||
: ${varnishd_storage:="file,/tmp,100M"} | : ${varnishd_storage:="file,/tmp,100M"} | ||||
: ${varnishd_hash:="classic,16383"} | : ${varnishd_hash:="classic,16383"} | ||||
: ${varnishd_user:="www"} | : ${varnishd_user:="www"} | ||||
: ${varnishd_group:="www"} | : ${varnishd_group:="www"} | ||||
if [ -n "${varnishd_config}" ] ; then | 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:="-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_extra_flags}"} | ||||
else | 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:="-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_extra_flags}"} | ||||
fi | fi | ||||
# If we leave these set, rc.subr will su to them before starting | # If we leave these set, rc.subr will su to them before starting | ||||
# varnishd, which is not what we want. | # varnishd, which is not what we want. | ||||
unset varnishd_user | unset varnishd_user | ||||
unset varnishd_group | unset varnishd_group | ||||
pidfile="${varnishd_pidfile}" | pidfile="${varnishd_pidfile}" | ||||
run_rc_command "$1" | run_rc_command "$1" |