diff options
author | EuAndreh <eu@euandre.org> | 2023-03-30 08:35:16 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-03-30 08:35:16 -0300 |
commit | be84eba41f29df406d5bedc6a7228840c89f4e9f (patch) | |
tree | a8c5df408a6b620748ecc183cbd9b3f3006b2bd7 | |
parent | conf.env: Separate $RSYNC_ACCT from $RSYNC_ADDR (diff) | |
download | toph-be84eba41f29df406d5bedc6a7228840c89f4e9f.tar.gz toph-be84eba41f29df406d5bedc6a7228840c89f4e9f.tar.xz |
backup.sh: Fix capture of $STATUS to the desired behaviour
Notes
See CI logs with:
git notes --ref=refs/notes/ci-logs show be84eba41f29df406d5bedc6a7228840c89f4e9f
git notes --ref=refs/notes/ci-data show be84eba41f29df406d5bedc6a7228840c89f4e9f
Exit status: 0
Duration: 22
-rwxr-xr-x | src/infrastructure/scripts/backup.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/infrastructure/scripts/backup.sh b/src/infrastructure/scripts/backup.sh index 47cc76c..83a6cdc 100755 --- a/src/infrastructure/scripts/backup.sh +++ b/src/infrastructure/scripts/backup.sh @@ -102,6 +102,7 @@ fi run() { + STATUS=0 set -x # shellcheck disable=2086 sudo -i borg create \ @@ -116,8 +117,7 @@ run() { /etc/ \ /var/ \ /opt/ \ - /srv/ - STATUS=$? + /srv/ || STATUS=$? set +x if [ "$STATUS" = 0 ]; then |