##Purge Akamai via SOAP by parsing out activated pages from an AEM/CQ Replication Agent.
Since Production Akamai could not be flushed globally we needed a job which could flush only today's Author activated pages.
CHILDPAGES1="/content/00" #add more paths if needed however will require multiple msm:masterPages | |
CHILDPAGES2="/content/01" | |
BLUEPRINT="/etc/blueprints/blueprintname" | |
ROLLOUTTITLE="00000" | |
ROLLOUTNAME="00000" | |
HOSTNAME="localhost" | |
USERPASS="admin:admin" | |
DESTPATH="/content/destpath" | |
curl -u "${USERPASS}" "http://${HOSTNAME}:4502/bin/wcmcommand" -d "cmd=createSite" -d "_charset_=utf-8" -d ":status=browser" -d "destPath=${DESTPATH}" -d "srcPath=${BLUEPRINGNAME}" -d "./jcr:title=${ROLLOUTTITLE}" -d "label=${ROLLOUTNAME}" -d "msm=masterPages@Delete:true" -d "msm:masterPages=${CHILDPAGES1}" -d "msm:masterPages=${CHILDPAGES2}" -w '%{http_code}' |
##Purge Akamai via SOAP by parsing out activated pages from an AEM/CQ Replication Agent.
Since Production Akamai could not be flushed globally we needed a job which could flush only today's Author activated pages.
curl --dump-header headers.txt --silent 'https://<<<CUT>>>/siteminderagent/forms/login.fcc' -H 'Host: <<<CUT>>>' -d "target=http%3A%2F%2F<<<CUT>>>%2Fpublish%2F" -d "USER=soukene" -d "PASSWORD=<<CUT>>>" -o /dev/null | |
SESSION=`grep SMSESSION headers.txt |sed -e 's/.*SMSESSION=//g;s/;.*//g;'` | |
curl --silent -k -H "Cookie: SMSESSION=${SESSION}" "https://<<<CUT>>>/publish" -L -w 'Last URL was: %{url_effective}\n' -o /dev/null |
USER="<<<CUT>>>" | |
TOKEN="<<<CUT>>>" | |
rate=`curl --silent 'http://www.bitcoinexchangerate.org/' |grep "#36" |sed -e 's/$//g;s/ .*//g;'` | |
#rate=`curl --silent -k "https://www.mtgox.com" |grep "Weighted Avg:" |sed -e 's/.*<span>//g;s/<\/span>.*//g;s/\..*$//g;'` | |
echo "Rate: ${rate}" | |
curl --silent -k "https://api.pushover.net/1/messages.json" -d "token=${TOKEN}" -d "user=${USER}" -d "title=Bitcoin Exchange Rate" -d "message=${rate}" -d "url_title=MtGox" "url=https://www.mtgox.com" -d "priority=-1" -d "device=edroid" -d "url=tasker://action bitcoin" -d "url_title=Repeat" | |
## |
##Any page extenstion can be changed from .html to .json eg: /content/site/en.json
##You can get all pages recursively /content/site/en.infinity.json
##Or specficy depth level /content/site/en.2.json
##If you want it to be more legible and maybe only 2 deep
sudo vi /etc/sysconfig/iptables | |
Eg opening port | |
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8118 -j ACCEPT | |
sudo service iptables restart |
Requires vlt to be setup and in path. ###Installation
###Usage Just call script with a root path and wait.
#Append this to bottom of AEM or CQ's stops script.
A quick way to login and validate AEM or CQ.
#Place at the bottom of the AEM or CQ Start script.