void-packages/srcpkgs/varnish/files/varnishd/run

22 lines
516 B
Bash
Executable File

#!/bin/sh
exec 2>&1
# Default options
VARNISH_ADDR=0.0.0.0:80
VARNISH_MGMT_ADDR=localhost:6082
VARNISH_CONFIG=/etc/varnish/default.vcl
VARNISH_STORAGE=malloc,64M
VARNISH_JAIL=unix,user=_varnish,workuser=_vcache
VARNISH_OPTIONS=
[ -r ./conf ] && . ./conf
exec varnishd \
-F \
${VARNISH_ADDR:+-a "$VARNISH_ADDR"} \
${VARNISH_CONFIG:+-f "$VARNISH_CONFIG"} \
${VARNISH_ADDR:+-T "$VARNISH_MGMT_ADDR"} \
${VARNISH_STORAGE:+-s "$VARNISH_STORAGE"} \
${VARNISH_JAIL:+-j "$VARNISH_JAIL"} \
${VARNISH_OPTIONS}