Skip to content

Instantly share code, notes, and snippets.

@hvelarde
Created November 24, 2016 15:04
Show Gist options
  • Save hvelarde/b7ceefae30e0dca3cc710e2843fd8946 to your computer and use it in GitHub Desktop.
Save hvelarde/b7ceefae30e0dca3cc710e2843fd8946 to your computer and use it in GitHub Desktop.
Part to restart instances with warm up
# need to change permission access to /etc/varnish/secret
[restart]
recipe = collective.recipe.template
input = inline:
#!/bin/bash
for i in {1..4}
do
varnishadm backend.set_health instance$i sick
${buildout:bin-directory}/supervisorctl restart app:instance$i
curl http://localhost:808$i/Plone > /dev/null
varnishadm backend.set_health instance$i auto
done
output = ${buildout:bin-directory}/restart
mode = 755
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment