One thing I do regularly is reload the default VCL that Varnish use, and to avoid using telnet or varnishadm manually, I’ve written a tiny script that loads and uses default.vcl (or any other file, for that matter).
#!/bin/bash
# Reload a varnish config
# Author: Kristian Lyngstol
FILE="/etc/varnish/default.vcl"
# Hostname and management port
# (defined in /etc/default/varnish or on startup)
HOSTPORT="localhost:6082"
NOW=`date +%s`
error()
{
echo 1>&2 "Failed to reload $FILE."
exit 1
}
varnishadm -T $HOSTPORT vcl.load reload$NOW $FILE || error
varnishadm -T $HOSTPORT vcl.use reload$NOW || error
echo Current configs:
varnishadm -T $HOSTPORT vcl.list

[...] Not wanting to telnet or use varnishadm manually, this script does the trick. This was taken from http://kristian.blog.linpro.no/2009/02/18/easy-reloading-of-varnish-vcl/: #!/bin/bash # Reload a varnish config # Author: Kristian Lyngstol [...]
Pingback by The road to Elysium / Easy reloading of Varnish — May 27, 2009 @ 08:24
Great little script man. Cheers.
Comment by Travis Bell — September 30, 2009 @ 03:46
[...] varnishreload From http://kristian.blog.linpro.no/2009/02/18/easy-reloading-of-varnish-vcl/ , this is a very handy script you can use to reload varnish’s configuration without having to [...]
Pingback by Linux: Handy Varnish commands > Richy's Random Ramblings — November 29, 2009 @ 14:53