Skip to content

Instantly share code, notes, and snippets.

View marutiprasad's full-sized avatar

Maruti Prasad marutiprasad

  • Splunk Inc
  • San Jose
View GitHub Profile
@marutiprasad
marutiprasad / akamaicachepurge.sh
Last active February 7, 2021 08:26
Akamai purge in the event of dispatcher / local cache purge
#!/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