This file contains hidden or 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/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 |