bundles/backup-client: fix detection of rsync errors
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2020-11-13 13:23:57 +01:00
parent 215c824893
commit e91ac7e457
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -17,15 +17,15 @@ rsync -zaAP --numeric-ids --delete --relative \
"${path}" "$ssh_login":backups/ "${path}" "$ssh_login":backups/
exitcode=$? exitcode=$?
if (( exitcode != 0 )) && (( exitcode != 24 )) if [[ $exitcode != 0 ]] && [[ $exitcode != 24 ]]
then then
rsync_errors+=" $ret" rsync_errors+=" $exitcode"
fi fi
% endfor % endfor
if [[ -n "$rsync_errors" ]] if [[ -n "$rsync_errors" ]]
then then
echo "rsync_error$rsync_errors" > "$statusfile" echo "rsync_error$rsync_errors" > "$statusfile"
fi else
echo "ok" > "$statusfile" echo "ok" > "$statusfile"
fi