Run script when Varnish starts

Posted by kipusoep on Server Fault See other posts from Server Fault or by kipusoep
Published on 2013-11-01T09:06:25Z Indexed on 2013/11/01 9:58 UTC
Read the original article Hit count: 156

Filed under:
|
|

I'd like to run a script when Varnish starts.
This script should execute a webrequest to a webserver (its backend), which then makes sure Varnish's cache gets filled with all pages residing on this webserver. So this script makes sure everyting is in Varnish's cache when Varnish (re)starts, because we're using Varnish as cache and fail-over (the webserver should be able to be down for let's say a week for example, without any consequences).

What are the possibilities to do this?

We can't just edit /etc/init.d/varnish and /usr/sbin/varnishd because they can het overwritten when updating varnish?

Thanks!

© Server Fault or respective owner

Related posts about varnish

Related posts about startup