#!/bin/bashME=`readlink -f $0`if [ "`hostname -f`" != "web1.leadreporter.com" ]; then echo "This script must be run from web1.leadreporter.com" exit 1fiif [ "`whoami`" != "www" ]; then if [ $# -gt 0 ]; then for F in $@; do su - www -c "$ME $F" done else su - www -c "$ME" fi exit $?fiif [ $# -eq 0 ]; then SYNC="admin_ssl app_ssl dev_ssl support_ssl leadreporter api_ssl live"else SYNC="$@"fifor F in $SYNC; do echo -n "Syncing $F..." rsync --exclude .svn --delete -avz -e 'ssh -p 2093' /home/www/$F www@10.0.0.84:/home/www/ >/dev/null 2>&1 echo "done."done