Skip to content

Instantly share code, notes, and snippets.

Avatar

Maruti Prasad marutiprasad

  • Splunk Inc
  • San Jose
View GitHub Profile
@marutiprasad
marutiprasad / akamaicachepurge.sh
Last active Feb 7, 2021
Akamai purge in the event of dispatcher / local cache purge
View akamaicachepurge.sh
#!/bin/sh
# Before running this script, plese ensure the following tools are installed.
# 1. inotifywait (yum install inotify-tools)
# 2. akamai-purge (script https://github.com/akamai/cli-purge)
# 3. Keep the CCU API credentials in the .edgerc file in the user home dir.
ROOTDIR='/data/www/htdocs/publish/content/site1'
HOST_URL='https://www.myhost.com'
inotifywait -m -r -e delete $ROOTDIR |
while read dir ev file; do