From: Holger Levsen Date: Fri, 25 Jan 2013 09:22:39 +0000 (+0100) Subject: fixup: fix liveboot_rsync to not fail (completly) if a destination datacenter is... X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=be7d3ba23f61b57e4e54fe5185e1bbc23f871a64;p=profitbricks%2Fjenkins-build-scripts.git fixup: fix liveboot_rsync to not fail (completly) if a destination datacenter is down (like pbb-de atm) --- diff --git a/liveboot_rsync.sh b/liveboot_rsync.sh index e045359..ba393fd 100755 --- a/liveboot_rsync.sh +++ b/liveboot_rsync.sh @@ -13,6 +13,9 @@ export RSYNC_SRC=/srv/mirror/liveboot RSYNC_FILTER='' +# +# destination patterns, must contain username and path and trailing slash, aka $USER@$HOST/$PATH/ +# # ri server RSYNC_DST1="liveboot@riserver/liveboot/" # storage DC (mgmt11) @@ -28,7 +31,7 @@ ping_and_rsync() { # # only try to rsync if destination is pingable # - if ping -c 1 $(echo $1 | sed -s 's#.*@\([0-9.]*\).*#\1#' ) > /dev/null ; then + if ping -c 1 $(echo $1 | sed -s 's#.*@\(.*\)/.*/#\1#' ) > /dev/null ; then echo "Now rsyncing results to $1 ..." rsync --password-file /etc/rsynclivebuild-send.pass -avv --delete --delete-excluded $RSYNC_FILTER $RSYNC_SRC/ rsync://$1 figlet "$2 OK"