More HTTPS fixes

This commit is contained in:
3wc
2023-09-19 15:45:37 +01:00
parent 6450c80236
commit 83a3d82ea5
3 changed files with 7 additions and 6 deletions

View File

@ -41,9 +41,10 @@ if [ -n "$s3_key_file" ] && [ -f "$s3_key_file" ] && [ -n "$AWS_ACCESS_KEY_ID" ]
fi
if [ -n "$https_password_file" ] && [ -f "$https_password_file" ]; then
RESTIC_PASSWORD="$(cat "${https_password_file}")"
export RESTIC_PASSWORD
restic_repo="rest:$restic_host"
HTTPS_PASSWORD="$(cat "${https_password_file}")"
export HTTPS_PASSWORD
restic_user="${RESTIC_USER:?RESTIC_USER not set}"
restic_repo="rest:https://$restic_user:$HTTPS_PASSWORD@$restic_host"
fi
if [ -z "$restic_repo" ]; then