X-Git-Url: https://www.hackdaworld.org/gitweb/?a=blobdiff_plain;f=bin%2Fbackup;h=b29d2b7a0a1cbc2a3c63d4ba81eafaf2f8717f53;hb=8f054797a11631cf2973d397c3a4449abd8e72a9;hp=4489388ed213b91a74d9e4f515bca478bc3e84be;hpb=49bb0cd550add3fc0a2339c555daf7f94c8ff83b;p=outofuni%2Fbackup.git diff --git a/bin/backup b/bin/backup index 4489388..b29d2b7 100755 --- a/bin/backup +++ b/bin/backup @@ -55,7 +55,7 @@ else log "host $host (via $remote) is online ..." fi -if [ ! -z "`ssh $user@$remote 'cat ~/.backup | grep ^no'`" ]; then +if [ ! -z "`ssh $user@$remote 'cat ~/.backup | grep ^off'`" ]; then log "backup rejected by client ..." exit 0 fi @@ -161,11 +161,13 @@ if [ ! -f $backupdir/.$today ]; then rsync=(rsync -aR -e "ssh -c $ciph" $rcomp --delete) rsync+=($rbw $user@$remote$rsrc $cbd) fi - "${rsync[@]}" + res=`"${rsync[@]}" 2>&1` ret=$? if [ "$ret" != "0" ]; then log backup terminated before completion ... + log reason: + log $res exit -50 fi