|
|
|
@ -36,6 +36,20 @@ then
|
|
|
|
|
set_custom_uacme_hookscript="--hookscript $uacme_hookscript"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
set_custom_acme_url=
|
|
|
|
|
if [ -f "${__object:?}/parameter/acme-url" ];
|
|
|
|
|
then
|
|
|
|
|
custom_acme_url=$(cat "${__object:?}/parameter/acme-url")
|
|
|
|
|
set_custom_acme_url="--acme-url $custom_acme_url"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
set_acme_eab_credentials=
|
|
|
|
|
if [ -f "${__object:?}/parameter/acme-eab-credentials" ];
|
|
|
|
|
then
|
|
|
|
|
acme_eab_credentials=$(cat "${__object:?}/parameter/acme-eab-credentials")
|
|
|
|
|
set_acme_eab_credentials="--eab-credentials $acme_eab_credentials"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Deploy simple HTTP vhost, allowing to serve ACME challenges.
|
|
|
|
|
__nginx_vhost "301-to-https-$domain" \
|
|
|
|
|
--domain "$domain" --altdomains "$altdomains" --to-https
|
|
|
|
@ -46,12 +60,18 @@ if [ -f "${__object:?}/parameter/force-cert-ownership-to" ]; then
|
|
|
|
|
cert_ownership=$(cat "${__object:?}/parameter/force-cert-ownership-to")
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
__uacme_account
|
|
|
|
|
# shellcheck disable=SC2086
|
|
|
|
|
__uacme_account \
|
|
|
|
|
$set_custom_acme_url \
|
|
|
|
|
$set_acme_eab_credentials \
|
|
|
|
|
|
|
|
|
|
# shellcheck disable=SC2086
|
|
|
|
|
require="__nginx_vhost/301-to-https-$domain __uacme_account" \
|
|
|
|
|
__uacme_obtain "$domain" \
|
|
|
|
|
--altdomains "$altdomains" \
|
|
|
|
|
$set_custom_uacme_hookscript \
|
|
|
|
|
$set_custom_acme_url \
|
|
|
|
|
$set_acme_eab_credentials \
|
|
|
|
|
--owner "$cert_ownership" \
|
|
|
|
|
--install-key-to "$nginx_certdir/$domain/privkey.pem" \
|
|
|
|
|
--install-cert-to "/$nginx_certdir/$domain/fullchain.pem" \
|
|
|
|
|