fix: exit immediately on error
This commit is contained in:
parent
d438a186bd
commit
1279cbd910
1 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
# Password can't be empty
|
# Password can't be empty
|
||||||
test -n "${BORG_PASSPHRASE}"
|
test -n "${BORG_PASSPHRASE}"
|
||||||
|
@ -35,7 +36,7 @@ for signal in TERM QUIT HUP EXIT INT KILL; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# It'll fail the second time
|
# It'll fail the second time
|
||||||
borg init --encryption=repokey "${SSH_ALIAS}:${DEST}"
|
borg init --encryption=repokey "${SSH_ALIAS}:${DEST}" || true
|
||||||
borg create -v --stats "${SSH_ALIAS}:${DEST}::${DATE}" "${ORIG}"
|
borg create -v --stats "${SSH_ALIAS}:${DEST}::${DATE}" "${ORIG}"
|
||||||
borg prune -v --stats --keep-daily ${KEEP} "${SSH_ALIAS}:${DEST}"
|
borg prune -v --stats --keep-daily ${KEEP} "${SSH_ALIAS}:${DEST}"
|
||||||
borg list "${SSH_ALIAS}:${DEST}"
|
borg list "${SSH_ALIAS}:${DEST}"
|
||||||
|
|
Loading…
Reference in a new issue