Skip to content

Commit

Permalink
fix: trim whitespaces from environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
buchdag committed Aug 3, 2021
1 parent 68a792e commit 49c03c9
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions app/letsencrypt_service_data.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ LETSENCRYPT_CONTAINERS=(
{{ $host := trimSuffix "." $host }}
{{ $hostHash := sha1 $host }}
{{- "\n" }}LETSENCRYPT_{{ $cid }}_{{ $hostHash }}_HOST=('{{ $host }}')
{{- "\n" }}LETSENCRYPT_{{ $cid }}_{{ $hostHash }}_KEYSIZE="{{ $container.Env.LETSENCRYPT_KEYSIZE }}"
{{- "\n" }}LETSENCRYPT_{{ $cid }}_{{ $hostHash }}_TEST="{{ $container.Env.LETSENCRYPT_TEST }}"
{{- "\n" }}LETSENCRYPT_{{ $cid }}_{{ $hostHash }}_EMAIL="{{ $container.Env.LETSENCRYPT_EMAIL }}"
{{- "\n" }}ACME_{{ $cid }}_{{ $hostHash }}_CA_URI="{{ $container.Env.ACME_CA_URI }}"
{{- "\n" }}ACME_{{ $cid }}_{{ $hostHash }}_PREFERRED_CHAIN="{{ $container.Env.ACME_PREFERRED_CHAIN }}"
{{- "\n" }}ACME_{{ $cid }}_{{ $hostHash }}_OCSP="{{ $container.Env.ACME_OCSP }}"
{{- "\n" }}ACME_{{ $cid }}_{{ $hostHash }}_EAB_KID="{{ $container.Env.ACME_EAB_KID }}"
{{- "\n" }}ACME_{{ $cid }}_{{ $hostHash }}_EAB_HMAC_KEY="{{ $container.Env.ACME_EAB_HMAC_KEY }}"
{{- "\n" }}ZEROSSL_{{ $cid }}_{{ $hostHash }}_API_KEY="{{ $container.Env.ZEROSSL_API_KEY }}"
{{- "\n" }}LETSENCRYPT_{{ $cid }}_{{ $hostHash }}_RESTART_CONTAINER="{{ $container.Env.LETSENCRYPT_RESTART_CONTAINER }}"
{{- "\n" }}LETSENCRYPT_{{ $cid }}_{{ $hostHash }}_KEYSIZE="{{ (trim $container.Env.LETSENCRYPT_KEYSIZE) }}"
{{- "\n" }}LETSENCRYPT_{{ $cid }}_{{ $hostHash }}_TEST="{{ (trim $container.Env.LETSENCRYPT_TEST) }}"
{{- "\n" }}LETSENCRYPT_{{ $cid }}_{{ $hostHash }}_EMAIL="{{ (trim $container.Env.LETSENCRYPT_EMAIL) }}"
{{- "\n" }}ACME_{{ $cid }}_{{ $hostHash }}_CA_URI="{{ (trim $container.Env.ACME_CA_URI) }}"
{{- "\n" }}ACME_{{ $cid }}_{{ $hostHash }}_PREFERRED_CHAIN="{{ (trim $container.Env.ACME_PREFERRED_CHAIN) }}"
{{- "\n" }}ACME_{{ $cid }}_{{ $hostHash }}_OCSP="{{ (trim $container.Env.ACME_OCSP) }}"
{{- "\n" }}ACME_{{ $cid }}_{{ $hostHash }}_EAB_KID="{{ (trim $container.Env.ACME_EAB_KID) }}"
{{- "\n" }}ACME_{{ $cid }}_{{ $hostHash }}_EAB_HMAC_KEY="{{ (trim $container.Env.ACME_EAB_HMAC_KEY) }}"
{{- "\n" }}ZEROSSL_{{ $cid }}_{{ $hostHash }}_API_KEY="{{ (trim $container.Env.ZEROSSL_API_KEY) }}"
{{- "\n" }}LETSENCRYPT_{{ $cid }}_{{ $hostHash }}_RESTART_CONTAINER="{{ (trim $container.Env.LETSENCRYPT_RESTART_CONTAINER) }}"
{{ end }}
{{ else }}
{{- "\n" }}LETSENCRYPT_{{ $cid }}_HOST=(
Expand All @@ -44,16 +44,16 @@ LETSENCRYPT_CONTAINERS=(
'{{ $host }}'{{ " " }}
{{- end -}}
)
{{- "\n" }}LETSENCRYPT_{{ $cid }}_KEYSIZE="{{ $container.Env.LETSENCRYPT_KEYSIZE }}"
{{- "\n" }}LETSENCRYPT_{{ $cid }}_TEST="{{ $container.Env.LETSENCRYPT_TEST }}"
{{- "\n" }}LETSENCRYPT_{{ $cid }}_EMAIL="{{ $container.Env.LETSENCRYPT_EMAIL }}"
{{- "\n" }}ACME_{{ $cid }}_CA_URI="{{ $container.Env.ACME_CA_URI }}"
{{- "\n" }}ACME_{{ $cid }}_PREFERRED_CHAIN="{{ $container.Env.ACME_PREFERRED_CHAIN }}"
{{- "\n" }}ACME_{{ $cid }}_OCSP="{{ $container.Env.ACME_OCSP }}"
{{- "\n" }}ACME_{{ $cid }}_EAB_KID="{{ $container.Env.ACME_EAB_KID }}"
{{- "\n" }}ACME_{{ $cid }}_EAB_HMAC_KEY="{{ $container.Env.ACME_EAB_HMAC_KEY }}"
{{- "\n" }}ZEROSSL_{{ $cid }}_API_KEY="{{ $container.Env.ZEROSSL_API_KEY }}"
{{- "\n" }}LETSENCRYPT_{{ $cid }}_RESTART_CONTAINER="{{ $container.Env.LETSENCRYPT_RESTART_CONTAINER }}"
{{- "\n" }}LETSENCRYPT_{{ $cid }}_KEYSIZE="{{ (trim $container.Env.LETSENCRYPT_KEYSIZE) }}"
{{- "\n" }}LETSENCRYPT_{{ $cid }}_TEST="{{ (trim $container.Env.LETSENCRYPT_TEST) }}"
{{- "\n" }}LETSENCRYPT_{{ $cid }}_EMAIL="{{ (trim $container.Env.LETSENCRYPT_EMAIL) }}"
{{- "\n" }}ACME_{{ $cid }}_CA_URI="{{ (trim $container.Env.ACME_CA_URI) }}"
{{- "\n" }}ACME_{{ $cid }}_PREFERRED_CHAIN="{{ (trim $container.Env.ACME_PREFERRED_CHAIN) }}"
{{- "\n" }}ACME_{{ $cid }}_OCSP="{{ (trim $container.Env.ACME_OCSP) }}"
{{- "\n" }}ACME_{{ $cid }}_EAB_KID="{{ (trim $container.Env.ACME_EAB_KID) }}"
{{- "\n" }}ACME_{{ $cid }}_EAB_HMAC_KEY="{{ (trim $container.Env.ACME_EAB_HMAC_KEY) }}"
{{- "\n" }}ZEROSSL_{{ $cid }}_API_KEY="{{ (trim $container.Env.ZEROSSL_API_KEY) }}"
{{- "\n" }}LETSENCRYPT_{{ $cid }}_RESTART_CONTAINER="{{ (trim $container.Env.LETSENCRYPT_RESTART_CONTAINER) }}"
{{ end }}
{{ end }}
{{ end }}

0 comments on commit 49c03c9

Please sign in to comment.