Skip to content

Instantly share code, notes, and snippets.

@ernestom
Created January 22, 2015 19:27
Show Gist options
  • Save ernestom/245229103db538bf55ed to your computer and use it in GitHub Desktop.
Save ernestom/245229103db538bf55ed to your computer and use it in GitHub Desktop.
Purgas de caché de Akamai con ECCU para Palacio de Hierro
#!/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