...
Code Block | ||
---|---|---|
| ||
#!/bin/sh # This file is managed by puppet # # Class: utweb_panel_scripts # Resource: File["/utweb/common/src/examples/clearcache.sh"] # Source: utweb_panel_scripts/files/clearcache.sh # # Example of automating the process of purging the HTTP proxy cache for # a UT Web content site. # # This assumes: # * the script is running on the UT Web panel server # * The script is being run as the UT Web site account # * the URL to purge is the site's main URL (utwNNNNN.utweb.utexas.edu) # * all sub-URL's of the main site should be purged as well ($site/*) # # Season to taste. # siteuser=`whoami` site=http://$siteuser.utweb.utexas.edu urlstopurge="$site $@" utweb_prod_balancers=" utweb-px-z1-p01.its.utexas.edu utweb-px-z1-p02.its.utexas.edu " if [ -z "$@" ] ; then echo "=== No additional domains were specified to purge ===" else echo "=== Domains to be purged $site $@ ===" fi for b in $utweb_prod_balancers; do id=`echo $b | sed s/.its.utexas.edu/_http/` for u in $urlstopurge ; do echo === $b $site curl -v \ --cookie "balancer_id=$id" \ -X PURGE \ -D - "$u/*" done done |
...