]> arthur.barton.de Git - backup-script.git/commitdiff
New config option "ping"
authorAlexander Barton <alex@barton.de>
Wed, 4 May 2011 15:47:26 +0000 (17:47 +0200)
committerAlexander Barton <alex@barton.de>
Wed, 4 May 2011 15:47:26 +0000 (17:47 +0200)
Default ist "1", ping the remote host to check if it is alive.
Set to "0" to always force rsync(1) to start.

bin/backup-script

index 21685f8c7905a8c93d19f39dc71854fba252c78c..d1164a0e0564e0910ac7f7499f2697126c89a6a3 100755 (executable)
@@ -130,6 +130,7 @@ for f in $sys; do
        ssh_args_add=""
        rsync_args_add=""
        compress=1
+       ping=1
        local=0
 
        case "$system" in
@@ -161,7 +162,7 @@ for f in $sys; do
        target="$target/$system"
        mkdir -p "$target"
 
-       if [ "$local" -eq 0 ]; then
+       if [ "$local" -eq 0 -a "$ping" -ne 0 ]; then
                # Check if system is alive
                ping -c 1 "$system" >/dev/null 2>&1
                if [ $? -ne 0 ]; then