Exit if the repository password is not configured
This commit is contained in:
parent
982cfe90d5
commit
2a5e4e426a
1 changed files with 1 additions and 0 deletions
|
@ -8,6 +8,7 @@ export PASSWORD_FILE="/tmp/restic_passwd"
|
|||
if [ -z "${RESTIC_REPO_PASSWORD}" ]; then
|
||||
if [ -z "${RESTIC_REPO_PASSWORD_FILE}" ]; then
|
||||
echo "You have to define one of these environment variables: RESTIC_REPO_PASSWORD or RESTIC_REPO_PASSWORD_FILE"
|
||||
exit 1
|
||||
else
|
||||
cp "${RESTIC_REPO_PASSWORD_FILE}" "${PASSWORD_FILE}"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue