21 lines
506 B
Bash
Executable File
21 lines
506 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# 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}
|