From a47b334de67241a446de48aa22ca31e5e01b4c7a Mon Sep 17 00:00:00 2001 From: SJP/farm Date: Sun, 7 Jan 2018 11:39:26 +1100 Subject: Add ssh port to local config vars --- rsync2eye.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rsync2eye.sh b/rsync2eye.sh index 6385dd3..e3a4a28 100755 --- a/rsync2eye.sh +++ b/rsync2eye.sh @@ -11,6 +11,7 @@ src=remoteSystem:/path/to/photos localpicdir=~/localpix walrusmountpoint=/mnt/walrus/eye +sshport=22 # end of local.config vars if [ -e local.config ]; then @@ -26,7 +27,8 @@ if [ ! -d ${dst} ]; then fi echo "$(date). Starting to move images from stan." begin=$(date +"%s") -rsync -a --remove-source-files --include='*/' --include='*.jpg' --exclude='*' -e "ssh -p 51337" $src ${localpicdir}/stansCams +rsyncstr="-a --remove-source-files --include='*/' --include='*.jpg' --exclude='*'" +rsync ${rsyncstr} -e "ssh -p ${sshport} " $src ${localpicdir}/stansCams if [ $? -ne 0 ]; then echo "rsync from stan failed with exit code $? - exiting" -- cgit v1.3