#!/bin/sh set -eu # import environment from config set -a . /usr/share/resticbackup/config || : . /etc/resticbackup/config || : set +a test -n "${RESTIC_REPOSITORY+1}" || test -n "${RESTIC_REPOSITORY_FILE+1}" test -n "${RESTIC_PASSWORD+1}" || test -n "${RESTIC_PASSWORD_COMMAND+1}" # check if repo is initialized restic cat config >/dev/null 2>&1 || restic init exec restic $@