Skip to content

Instantly share code, notes, and snippets.

@tkuldeep
Created October 15, 2013 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkuldeep/6991024 to your computer and use it in GitHub Desktop.
Save tkuldeep/6991024 to your computer and use it in GitHub Desktop.
Shell script for clearing varnish cache on multiple web servers
#!/bin/bash
# Clear complete cache in multiple web server
if [ -z $1]
then
curl -X BAN http://54.254.102.251/
curl -X BAN http://54.251.248.135/
# Clear cache of specific page
else
curl -X BAN http://54.254.102.251/$1
curl -X BAN http://54.251.102.251/$1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment