Commit 7a4538d0 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp
parents b8ceaaa8 446d5226
...@@ -13,9 +13,8 @@ VCL is an acronym for Varnish Configuration Language. In a VCL file, you config ...@@ -13,9 +13,8 @@ VCL is an acronym for Varnish Configuration Language. In a VCL file, you config
**Where is the documentation on VCL?** **Where is the documentation on VCL?**
We are working on documenting VCL. The `WIKI <http://varnish-cache.org/wiki/VCLExamples>`_ contains some examples. Please see ``man 7 vcl``. There are also some real-world examples on
the `wiki <http://varnish-cache.org/wiki/VCLExamples>`_
Please also see ``man 7 vcl``.
**How do I load VCL file while Varnish is running?** **How do I load VCL file while Varnish is running?**
......
...@@ -7,6 +7,7 @@ The Varnish Reference Manual ...@@ -7,6 +7,7 @@ The Varnish Reference Manual
.. toctree:: .. toctree::
vcl.rst vcl.rst
varnish-cli.rst
varnishadm.rst varnishadm.rst
varnishd.rst varnishd.rst
varnishhist.rst varnishhist.rst
......
...@@ -53,8 +53,10 @@ OPTIONS ...@@ -53,8 +53,10 @@ OPTIONS
-F Run in the foreground. -F Run in the foreground.
-f config Use the specified VCL configuration file instead of the builtin default. See vcl(7) for -f config Use the specified VCL configuration file instead of the
details on VCL syntax. builtin default. See vcl(7) for details on VCL
syntax. When no configuration is supplied varnishd will
not start the cache process.
-g group Specifies the name of an unprivileged group to which the child process should switch -g group Specifies the name of an unprivileged group to which the child process should switch
before it starts accepting connections. This is a shortcut for specifying the group before it starts accepting connections. This is a shortcut for specifying the group
...@@ -95,11 +97,14 @@ OPTIONS ...@@ -95,11 +97,14 @@ OPTIONS
-M address:port -M address:port
Connect to this port and offer the command line Connect to this port and offer the command line
interface. Think of it as a reverse shell. interface. Think of it as a reverse shell. When running with
-M and there is no backend defined the child process (the cache)
will not start initially.
-t ttl -t ttl
Specifies a hard minimum time to live for cached documents. This is a shortcut for Specifies a hard minimum time to live for cached
specifying the default_ttl run-time parameter. documents. This is a shortcut for specifying the
default_ttl run-time parameter.
-u user Specifies the name of an unprivileged user to which the child -u user Specifies the name of an unprivileged user to which the child
process should switch before it starts accepting process should switch before it starts accepting
......
...@@ -114,6 +114,14 @@ rh_status_q() { ...@@ -114,6 +114,14 @@ rh_status_q() {
rh_status >/dev/null 2>&1 rh_status >/dev/null 2>&1
} }
configtest() {
if [ -f "$VARNISH_VCL_CONF" ]; then
$exec -f "$VARNISH_VCL_CONF" -C -n /tmp > /dev/null && echo "Syntax ok"
else
echo "VARNISH_VCL_CONF is unset or does not point to a file"
fi
}
# See how we were called. # See how we were called.
case "$1" in case "$1" in
start) start)
...@@ -141,6 +149,9 @@ case "$1" in ...@@ -141,6 +149,9 @@ case "$1" in
rh_status_q || exit 0 rh_status_q || exit 0
restart restart
;; ;;
configtest)
configtest
;;
*) *)
echo "Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" echo "Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment