From a563473b58bbfadc2c3780e44a15304b2b5c846f Mon Sep 17 00:00:00 2001 From: Matthias Leutenegger Date: Wed, 3 Jun 2020 22:45:20 +0200 Subject: [PATCH] CHANGE: update all vars --- templates/restic_access_Linux.j2 | 2 +- templates/restic_script_Linux.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/restic_access_Linux.j2 b/templates/restic_access_Linux.j2 index ca0c313..9c35506 100644 --- a/templates/restic_access_Linux.j2 +++ b/templates/restic_access_Linux.j2 @@ -9,7 +9,7 @@ export RESTIC_PASSWORD='{{ restic_repos[item.repo].password | regex_replace('\'' export AWS_ACCESS_KEY_ID={{ restic_repos[item.repo].aws_access_key }} {% endif %} {% if restic_repos[item.repo].aws_secret_access_key is defined %} -export AWS_SECRET_ACCESS_KEY="{{ restic_repos[item.repo].aws_secret_access_key | regex_escape() }}" +export AWS_SECRET_ACCESS_KEY="{{ restic_repos[item.repo].aws_secret_access_key | regex_replace('\'', '\'\\\'\'') }}" {% endif %} {% if restic_repos[item.repo].aws_default_region is defined %} export AWS_DEFAULT_REGION={{ restic_repos[item.repo].aws_default_region }} diff --git a/templates/restic_script_Linux.j2 b/templates/restic_script_Linux.j2 index e6f42ea..00f153b 100644 --- a/templates/restic_script_Linux.j2 +++ b/templates/restic_script_Linux.j2 @@ -10,7 +10,7 @@ BACKUP_NAME={{ item.name }} export AWS_ACCESS_KEY_ID={{ restic_repos[item.repo].aws_access_key }} {% endif %} {% if restic_repos[item.repo].aws_secret_access_key is defined %} -export AWS_SECRET_ACCESS_KEY="{{ restic_repos[item.repo].aws_secret_access_key | regex_escape() }}" +export AWS_SECRET_ACCESS_KEY="{{ restic_repos[item.repo].aws_secret_access_key | regex_replace('\'', '\'\\\'\'') }}" {% endif %} {% if restic_repos[item.repo].aws_default_region is defined %} export AWS_DEFAULT_REGION={{ restic_repos[item.repo].aws_default_region }}