#!/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 $@