aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-05-10 18:47:11 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-05-10 18:47:11 -0300
commitc43bac5911f8d97044b505466f21ed87f43d84fc (patch)
tree70092c32dde53185005edfcc655811353330906f /handlers
parentc9aa8b1d6f809ab672032a020a476185d095de3c (diff)
downloadbackupninja-c43bac5911f8d97044b505466f21ed87f43d84fc.tar.gz
backupninja-c43bac5911f8d97044b505466f21ed87f43d84fc.tar.bz2
Ensure that a non-zero rsync exit status is caught by our handler (#3892)
Diffstat (limited to 'handlers')
-rw-r--r--handlers/rsync.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/handlers/rsync.in b/handlers/rsync.in
index 884a885..73507c8 100644
--- a/handlers/rsync.in
+++ b/handlers/rsync.in
@@ -1121,6 +1121,9 @@ for SECTION in $include; do
set_filelist
set_dest
+ # Ensure that a non-zero rsync exit status is caught by our handler
+ set -o pipefail
+
info "Syncing $SECTION on $dest_path..."
debug $nice $rsync "${rsync_options[@]}" $filelist_flag $excludes $batch_option $orig $dest_path
$nice $rsync "${rsync_options[@]}" $filelist_flag $excludes $batch_option $orig $dest_path | tee -a $log