diff options
author | Robin Obůrka <r.oburka@gmail.com> | 2016-07-24 15:44:17 +0200 |
---|---|---|
committer | Robin Obůrka <r.oburka@gmail.com> | 2016-07-24 16:34:02 +0200 |
commit | d2b5e675b24dcfda14c1ed9a878a99bd710c4714 (patch) | |
tree | 7e3b37aabaa900789893b9899e2ac060af5e2dbe /backuper.sh | |
parent | Remove some more debug outputs (diff) | |
download | backuper-d2b5e675b24dcfda14c1ed9a878a99bd710c4714.tar.xz |
Report what failed
Diffstat (limited to 'backuper.sh')
-rw-r--r-- | backuper.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/backuper.sh b/backuper.sh index ce4d2a8..eac86aa 100644 --- a/backuper.sh +++ b/backuper.sh @@ -184,7 +184,7 @@ add_stage() { [ ! -p "$RUNDIR"/fifo_"$NEXTSTAGE" ] && mkfifo "$RUNDIR"/fifo_"$NEXTSTAGE" ## Run requested command and store PID - $@ > "$RUNDIR"/fifo_"$NEXTSTAGE" < "$RUNDIR"/fifo_"$STAGE" || die & + $@ > "$RUNDIR"/fifo_"$NEXTSTAGE" < "$RUNDIR"/fifo_"$STAGE" || die "One of the pipeline commands failed" & echo "$!" >> "$RUNDIR"/"$PID_FILE" ## Process started - increment @@ -216,10 +216,10 @@ start_pipeline() { ## ... and it takes 100% CPU. So, for now: Do not use mbuffer as the last one. #add_stage "mbuffer -q -m 100M" - start_store || die & + start_store || die "Store command failed" & PID_STORE=$! - start_command || die & + start_command || die "Backup command failed" & PID_GENERATE=$! wait "$PID_STORE" "$PID_GENERATE" |