From 547be699fdcd294d79d7a0d0788f8ba501f5a86a Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 5 Aug 2022 15:40:27 +0200 Subject: [PATCH] Use the raw directive to protect the shell code. --- templates/letsencrypt-haproxy-refresh.sh.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/letsencrypt-haproxy-refresh.sh.j2 b/templates/letsencrypt-haproxy-refresh.sh.j2 index 541a088..267e405 100644 --- a/templates/letsencrypt-haproxy-refresh.sh.j2 +++ b/templates/letsencrypt-haproxy-refresh.sh.j2 @@ -4,11 +4,14 @@ # renewal. It'll concatenate the needed certificates for the PEM file that # HAProxy reads. +{% raw %} die() { echo "$*" 1>&2 ; exit 1; } +{% endraw %} H_NAME="{{ letsencrypt_acme_sh_certs_data_prefix }}" LE_CERTS_DIR=/var/lib/acme/live/$H_NAME +{% raw %} LE_ENV_FILE=/etc/default/acme_sh_request_env if [ -f "$LE_ENV_FILE" ] ; then . "$LE_ENV_FILE" @@ -52,3 +55,4 @@ elif [ "$ACTION" == "restart" ]; then # script. $container_cli restart "$haproxy_container_name" fi +{% endraw %}