diff options
Diffstat (limited to 'bundles/restic-backup/files/resticw')
| -rw-r--r-- | bundles/restic-backup/files/resticw | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bundles/restic-backup/files/resticw b/bundles/restic-backup/files/resticw new file mode 100644 index 0000000..e3a3e87 --- /dev/null +++ b/bundles/restic-backup/files/resticw @@ -0,0 +1,21 @@ +#!/bin/sh +set -eu + +# import environment from config +# can overwrite above defaults +set -a +. /etc/restic/restic.conf +set +a + +test -n "${RESTIC_REPOSITORY+1}" +test -n "${RESTIC_PASSWORD+1}" + +case "${RESTIC_REPOSITORY}" in +b2*) + test -n "${B2_ACCOUNT_ID+1}" + test -n "${B2_ACCOUNT_KEY+1}" + ;; + +esac + +exec restic $@ |