renames and tweaks
This commit is contained in:
parent
09410f9285
commit
69350f9921
@ -7,4 +7,4 @@ echo
|
|||||||
echo "<------------------------------------------------->"
|
echo "<------------------------------------------------->"
|
||||||
echo "cronjob running on "$(date)
|
echo "cronjob running on "$(date)
|
||||||
echo "Running certbot renew"
|
echo "Running certbot renew"
|
||||||
certbot renew --noninteractive --no-self-upgrade
|
certbot renew --non-interactive --no-self-upgrade
|
||||||
@ -7,7 +7,11 @@
|
|||||||
# new certificates and keys; the shell variable $RENEWED_DOMAINS will contain a space-delimited list
|
# new certificates and keys; the shell variable $RENEWED_DOMAINS will contain a space-delimited list
|
||||||
# of renewed certificate domains (for example, "example.com www.example.com" (default: None)
|
# of renewed certificate domains (for example, "example.com www.example.com" (default: None)
|
||||||
|
|
||||||
|
echo "Running deploy script ..."
|
||||||
|
|
||||||
KEYPATH="/letsencrypt"
|
KEYPATH="/letsencrypt"
|
||||||
|
echo "KEYPATH is ${KEYPATH}"
|
||||||
|
echo "LINEAGE is ${RENEWED_LINEAGE}"
|
||||||
|
|
||||||
# clean current KEYPATH contents
|
# clean current KEYPATH contents
|
||||||
rm -f ${KEYPATH}/*
|
rm -f ${KEYPATH}/*
|
||||||
@ -53,9 +53,9 @@ ln -s /config/crontabs /etc/crontabs
|
|||||||
|
|
||||||
# Copy deploy hook defaults if needed
|
# Copy deploy hook defaults if needed
|
||||||
# [[ -z "$(ls -A /letsencrypt/renewal-hooks/deploy)" ]] && \
|
# [[ -z "$(ls -A /letsencrypt/renewal-hooks/deploy)" ]] && \
|
||||||
[[ ! -f /config/deploy/deploy-certs.sh ]] && \
|
[[ ! -f /config/deploy/01-deploy_certs.sh ]] && \
|
||||||
echo "Copying deploy hooks..." && \
|
echo "Copying deploy hooks..." && \
|
||||||
cp -n /defaults/deploy/deploy-certs.sh /config/deploy/
|
cp -n /defaults/deploy/01-deploy_certs.sh /config/deploy/
|
||||||
chmod +x /config/deploy/*
|
chmod +x /config/deploy/*
|
||||||
# Link /config/deploy
|
# Link /config/deploy
|
||||||
echo "Linking /config/deploy -> /etc/letsencrypt/renewal-hooks/deploy ..."
|
echo "Linking /config/deploy -> /etc/letsencrypt/renewal-hooks/deploy ..."
|
||||||
@ -169,7 +169,10 @@ echo -e "ORIGTLD=\"${TLD}\" ORIGSUBDOMAINS=\"${SUBDOMAINS}\" ORIGONLY_SUBDOMAINS
|
|||||||
if [ ! -f "/letsencrypt/fullchain.pem" ]; then
|
if [ ! -f "/letsencrypt/fullchain.pem" ]; then
|
||||||
echo "Generating new certificate"
|
echo "Generating new certificate"
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
certbot certonly --renew-by-default --server ${ACMESERVER} ${PREFCHAL} --rsa-key-size 4096 ${EMAILPARAM} --agree-tos ${TLD_REAL}
|
certbot certonly --non-interactive --force-renewal --server ${ACMESERVER} ${PREFCHAL} --rsa-key-size 4096 ${EMAILPARAM} --agree-tos ${TLD_REAL}
|
||||||
|
echo $(printenv)
|
||||||
|
/usr/bin/with-contenv bash /etc/letsencrypt/renewal-hooks/deploy/01-deploy_certs.sh
|
||||||
|
|
||||||
if [ -f /letsencrypt/fullchain.pem ]; then
|
if [ -f /letsencrypt/fullchain.pem ]; then
|
||||||
cd /letsencrypt || exit
|
cd /letsencrypt || exit
|
||||||
else
|
else
|
||||||
@ -10,6 +10,6 @@ if openssl x509 -in /letsencrypt/fullchain.pem -noout -checkend 86400 >/dev/null
|
|||||||
echo "Letting the cron script handle the renewal attempts overnight (2:08am)."
|
echo "Letting the cron script handle the renewal attempts overnight (2:08am)."
|
||||||
else
|
else
|
||||||
echo "The cert is either expired or it expires within the next day. Attempting to renew. This could take up to 10 minutes."
|
echo "The cert is either expired or it expires within the next day. Attempting to renew. This could take up to 10 minutes."
|
||||||
/app/le-renew.sh
|
/app/le_renew.sh
|
||||||
sleep 1
|
sleep 1
|
||||||
fi
|
fi
|
||||||
Loading…
Reference in New Issue
Block a user