borg-backup: fix backup script failure match

Fix a typo in the failure match, and log the error code in that case.

Change-Id: Ie17042237986d0bed58e95c271f868c735c724d2
This commit is contained in:
Ian Wienand 2021-02-11 16:38:57 +11:00
parent d8779a42da
commit ad1992955a

View File

@ -47,8 +47,8 @@ do
if [[ ${_status[0]} -ne 0 ]]; then
info "Streaming script ${f} failed!"
stream_exit=${_status[0]}
elif [[ ${_status[1]} -ne 1 ]]; then
info "Borg failed!"
elif [[ ${_status[1]} -ne 0 ]]; then
info "Borg failed (rc: ${_status[1]})!"
stream_exit=${_status[1]}
else
stream_exit=0