]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
fixup: fix liveboot_rsync to not fail (completly) if a destination datacenter is...
authorHolger Levsen <holger@layer-acht.org>
Fri, 25 Jan 2013 09:22:39 +0000 (10:22 +0100)
committerHolger Levsen <holger@layer-acht.org>
Fri, 25 Jan 2013 09:22:39 +0000 (10:22 +0100)
liveboot_rsync.sh

index e045359615d333e44b656fd06a5691823335ad50..ba393fd1eadb7830641efaf49ea3c4054cd0de27 100755 (executable)
@@ -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"