Created
January 22, 2015 19:27
-
-
Save ernestom/245229103db538bf55ed to your computer and use it in GitHub Desktop.
Purgas de caché de Akamai con ECCU para Palacio de Hierro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Menta Network - www.menta.mx | |
USERNAME="" | |
PASSWORD="" | |
hash akamai_api 2>/dev/null || { | |
echo >&2 "The Ruby Gem 'akamai_api' is needed:" | |
echo >&2 "\`$ sudo gem install akamai_api\`" | |
exit 1; | |
} | |
log_file="/tmp/clearcache.log" | |
request_file="/tmp/clearcacherequest.xml" | |
if [ ! -f $request_file ]; then | |
cat > $request_file <<XML | |
<?xml version="1.0"?> | |
<eccu> | |
<match:ext value="html htm"> | |
<revalidate>now</revalidate> | |
</match:ext> | |
</eccu> | |
XML | |
fi | |
akamai_api eccu publish_xml \ | |
$request_file \ | |
www.elpalaciodehierro.com \ | |
--username=$USERNAME \ | |
--password=$PASSWORD >> $log_file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment