7611fb9d76
* add dehydrated role with pdns-api.sh support * Minor changes to Readme * Remove Meta * move dehydrated to linse * Remove Zuckerwatte from PR (nothing to do with dehydrated) * Add other domains to dehydrated config, added hook_chain * Add authorized keys for cert user, add structures in /home/cert/ for checking out certs * Send dehydrated ouput to /dev/null * user authorized_keys module, add kumpir key * Fix typo. Use \\n for each ssh-key * remove unnecessary .ssh creation (done by authorized_key module) * Added wrapper script to execute two hooks: pdns_api.sh + deploy certificates * Remove challengetype variable, as only dns-01 is supported anyway. * Add freifunk-mainz.de domain * fix cert deploy script.
25 lines
563 B
Django/Jinja
25 lines
563 B
Django/Jinja
#jinja2: trim_blocks: True, lstrip_blocks: True
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
set -u
|
|
set -o pipefail
|
|
|
|
deploy_cert() {
|
|
local DOMAIN="${1}" KEYFILE="${2}" CERTFILE="${3}" FULLCHAINFILE="${4}" CHAINFILE="${5}" TIMESTAMP="${6}"
|
|
|
|
{% if dehydrated_deploycert is string %}
|
|
{{ dehydrated_deploycert }}
|
|
{% else %}
|
|
{% for domain, script in dehydrated_deploycert.items() %}
|
|
if [[ "${DOMAIN}" = "{{ domain }}" ]]; then
|
|
{{ script }}
|
|
fi
|
|
{% endfor %}
|
|
{% endif %}
|
|
}
|
|
|
|
HANDLER="$1"; shift
|
|
if [[ "${HANDLER}" =~ ^(deploy_cert)$ ]]; then
|
|
"$HANDLER" "$@"
|
|
fi
|