[Varnish] #854: patch: extra features for the varnish initrc script
Varnish
varnish-bugs at varnish-cache.org
Tue Feb 1 14:30:22 CET 2011
#854: patch: extra features for the varnish initrc script
----------------------------------------+-----------------------------------
Reporter: jhalfmoon | Type: enhancement
Status: new | Priority: low
Milestone: | Component: build
Version: trunk | Severity: trivial
Keywords: initrc patch extra feature |
----------------------------------------+-----------------------------------
Hi,
The following patch adds a few feautures to the varnish
/etc/init.d/varnish script:
- status shows current daemon status and loaded vcls
- purge cleans out all vcls except the active vcls
- reload allows you to safely load a new vcl config into varnish.
- prev activates the previous config, if present
- next activates the next config, if present
These last two feauture allow for a quick rollback of the config, in case
an error is detected in a config.
Also, the initrc allows for multiple varnish instances by creating
symlinks to the initrc script. That way you do not have to create multiple
initrc scripts. If for example the following links exist:
/etc/init.d/varnish-acceptance -> /etc/init.d/varnish
/etc/init.d/varnish-test -> /etc/init.d/varnish
The the 'varnish-acceptance' instance would get its config files from the
following location:
/etc/varnish-acceptance
/etc/sysconfig/varnish-acceptance
and the 'varnish-test' instance would get its files from:
/etc/varnish-test
/etc/sysconfig/varnish-test
You can disable the 'multi-instance' feature by changing the
'instancename' variable in the initrc script from instancename=`basename
$0` to 'instancename=varnish' . I also added an example sysconfig file, to
show how to use the multi-instance feature.
--
Ticket URL: <http://www.varnish-cache.org/trac/ticket/854>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list