Merge pull request #4 from chillout2k/devel

DDNS01_ONECERT
This commit is contained in:
Dominik Chilla 2020-03-23 23:04:16 +01:00 committed by GitHub
commit 90ad516fb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,16 +34,24 @@ if [ ! -z "${ACME_FQDNS+x}" ]; then
exit 1
fi
if [ -d /dehydrated ]; then
ONELINE=''
if [ ! -z "${DDNS01_ONECERT}" ]; then
ONELINE='-n'
fi
echo -n "" > /dehydrated/domains.txt
for fqdn in ${ACME_FQDNS}; do
echo "${fqdn}" >> /dehydrated/domains.txt
echo "${fqdn}"
echo "${ONELINE}" "${fqdn} " >> /dehydrated/domains.txt
if [ ! -d "/secrets/ssl/${fqdn}" ]; then
mkdir -p "/secrets/ssl/${fqdn}"
fi
done
if [ ! -z "${ONELINE}" ]; then
echo "" >> /dehydrated/domains.txt
fi
chmod +x /app/zwackl_hook.sh
chmod +x /dehydrated/renew_certs
ln -f -s /dehydrated/renew_certs /etc/periodic/daily/renew_certs
# chmod +x /dehydrated/renew_certs
# ln -f -s /dehydrated/renew_certs /etc/periodic/daily/renew_certs
if [ -z "$(ls -A /dehydrated/accounts)" ]; then
cd /dehydrated && /dehydrated/dehydrated --register --accept-terms
fi