Inside your AEM bin folder you will find a proxy.jar. You can the point AEM to this proxy and run the proxy pointing to the real LDAP server.
Helps for debugging and in this case I added this snippet to our development servers startup script.
while [ 1 ]; do | |
date |tee -a listthreads.log | |
ps -eLf |grep -c -E "^adobe " |tee -a listthreads.log | |
sleep 5 | |
done; |
function sendToEDROID { | |
MESSAGE="${1}" | |
HTMLSAFE_MESSAGE=`perl -MURI::Escape -e ' print uri_escape($ARGV[0]);' "${1}"` | |
if [ ! -z "${MESSAGE}" ]; then | |
echo "`date` ||| SENDING ||| EDROID ||| ${MESSAGE}" |tee -a logs/workchecker.autoremote.log | |
curl --silent "https://autoremotejoaomgcd.appspot.com/sendmessage?key=<<<CUT>>>&message=${HTMLSAFE_MESSAGE}&sender=${0}" -o /dev/null -w "HTTPCODE: %{http_code}\n" | |
else | |
echo "`date` ||| SENDING ||| EDROID ||| emptymesage" |tee -a logs/workchecker.autoremote.log | |
curl --silent "https://autoremotejoaomgcd.appspot.com/sendmessage?key=<<<CUT>>>&message=emptymessage&sender=${0}" -o /dev/null -w "HTTPCODE: %{http_code}\n" |
Inside your AEM bin folder you will find a proxy.jar. You can the point AEM to this proxy and run the proxy pointing to the real LDAP server.
Helps for debugging and in this case I added this snippet to our development servers startup script.
This was used for converting ACL packages and then globalized. This could be useful for bulk changing a package before reinstallation.
while inotifywait -e modify -e create -e delete /synced/; do | |
rsync -avz /synced/ -e ssh 192.168.1.114:/synced/ | |
done |
USER_MAP="USERNAME1 USERNAME2 USERNAME3" | |
for user in ${USER_MAP}; do | |
curl -L --silent -u admin:admin "http://<<<CUT>>>:4502/publish/bin/security/authorizables.json?limit=99&_charset_=utf-8&filter=${user}" |sed -e 's/,/\n/g;' |grep "home/groups" |sed -e 's/.*cn=//g' | sed ':a;N;$!ba;s/\n/, /g'; | |
done |
We have a script which looks up user information then redirects them to there appropriate page.
Since group syncronization is completely custom in this application we had an issue with users created before this script ran would land on an incorrect page.
By squeezing this snippet into this redirect jsp it would popupalte the msising entries.
#!/bin/sh | |
#export http_proxy=192.168.1.11:8888; | |
#export https_proxy=192.168.1.11:8888; | |
USER="<<<CUT>>>" | |
TOK="<<<CUT>>>" | |
echo "Starting at `date`"; |
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" | |
# |