17 lines
466 B
Bash
17 lines
466 B
Bash
#!/bin/sh
|
|
|
|
set -euo pipefail
|
|
|
|
: "${DOMAINS?Error: DOMAINS environment variable is not set.}"
|
|
|
|
acme.sh --register-account --server $ACME_SERVER
|
|
|
|
for domain in ${DOMAINS//,/ }; do
|
|
acme.sh --issue --standalone -d $domain --server $ACME_SERVER
|
|
|
|
acme.sh --install-cert -d $domain \
|
|
--key-file /tmp/${domain}_key.pem \
|
|
--fullchain-file /tmp/${domain}_cert.pem \
|
|
--reloadcmd "/opt/scripts/upload-certificate.sh \"$domain\""
|
|
done
|
|
|