Write error message on error

This commit is contained in:
David Bartley 2008-04-18 19:36:27 -04:00
parent e688cfcb31
commit 1a0a88156a
1 changed files with 4 additions and 0 deletions

View File

@ -102,6 +102,10 @@ rsync --recursive --links --hard-links --times --verbose --delay-updates --delet
--exclude "Archive-Update-in-Progress-${HOSTNAME}" \
--address=$ADDRESS $TMP_EXCLUDE \
$RSYNC_HOST::$RSYNC_DIR $TO >> $LOGFILE 2>&1
if [[ "$?" != "0" ]]; then
echo "ERROR: Help, something weird happened" | tee -a $LOGFILE
echo "mirroring /pool exited with exitcode" $result | tee -a $LOGFILE
fi
savelog $LOGFILE >/dev/null