Due to an issue where pages were being corrupted this was placed to search for incorrect HTML files in the dispatcher cache and cleanup as needed. Was a quick workaround.
Last active
February 18, 2016 16:37
-
-
Save toodooleedoo/9790ca94ef96d907b37e to your computer and use it in GitHub Desktop.
MP #AEM #NIX dispather cache cleaner
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/sh | |
MAP="akl ath bei brn bru cph dub dvt fra hel ist kgh lhm lis lon mad mex mil na ndh ngo par pdrm1 saf sao sas sou sto syd tlv vie" | |
LOGFILE=/apps/cache-cleanup/cache_cleaner_`date '+%d%m'`.log | |
> ${LOGFILE} | |
cd /apps/oracleAS/prod/mid/Apache/Apache/htdocs/ONLINE/dispatcher/cache/publish/content/01/; | |
for val in ${MAP}; do | |
grep -r "publish/content/01" ${val}/* |grep -v "/${val}" |grep -v "/ic" |grep -v "affiliate" |grep "<li" |awk -F: '{print $1}' |while read line; do | |
rm -f ${line} | |
echo "REMOVING - `date` - ${line}" |tee -a ${LOGFILE} | |
done; | |
grep -r -E '(<div class="mega_menu_item_wrapper.*"><\/div>)' ${val}/* |awk -F: '{print $1}' |while read line; do | |
rm -f ${line} | |
echo "REMOVING - `date` - ${line}" |tee -a ${LOGFILE} | |
done; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment