Test and exit for jq error before domain loop
This commit is contained in:
parent
ff40467207
commit
69e4f35d9a
1 changed files with 2 additions and 1 deletions
|
@ -155,7 +155,8 @@ echo -e "-----BEGIN RSA PRIVATE KEY-----\n${priv}\n-----END RSA PRIVATE KEY-----
|
|||
| openssl rsa -inform pem -out "${pdir}/letsencrypt.key"
|
||||
|
||||
# Process the certificates for each of the domains in acme.json
|
||||
for domain in $(jq -r '.Certificates[].Domain.Main' ${acmefile}); do
|
||||
domains=$(jq -r '.Certificates[].Domain.Main' ${acmefile}) || bad_acme
|
||||
for domain in $domains; do
|
||||
# Traefik stores a cert bundle for each domain. Within this cert
|
||||
# bundle there is both proper the certificate and the Let's Encrypt CA
|
||||
echo "Extracting cert bundle for ${domain}"
|
||||
|
|
Loading…
Reference in a new issue