diff --git a/type/__uacme_obtain/man.rst b/type/__uacme_obtain/man.rst index f1db899..16ebe87 100644 --- a/type/__uacme_obtain/man.rst +++ b/type/__uacme_obtain/man.rst @@ -38,7 +38,8 @@ install-key-to Installation path of the certificate's private key. renew-hook - Renew hook executed on certificate renewal (e.g. `service nginx reload`). + Renew hook executed on certificate renewal (e.g. `service nginx reload`, `-` + for the standard input). force-cert-ownership-to Override default ownership for TLS certificate, passed as argument to chown. diff --git a/type/__uacme_obtain/manifest b/type/__uacme_obtain/manifest index b41ddde..a40119b 100644 --- a/type/__uacme_obtain/manifest +++ b/type/__uacme_obtain/manifest @@ -109,7 +109,11 @@ export CERT_TARGET RENEW_HOOK= if [ -f "${__object:?}/parameter/renew-hook" ]; then - RENEW_HOOK="$(cat "${__object:?}/parameter/renew-hook")" + if [ "$(cat "${__object:?}/parameter/renew-hook")" = "-" ]; then + RENEW_HOOK="$(cat ${__object:?}/stdin)" + else + RENEW_HOOK="$(cat "${__object:?}/parameter/renew-hook")" + fi fi export RENEW_HOOK