bundles/backup-client: fix detection of rsync errors
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
215c824893
commit
e91ac7e457
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue