Add logs to cron
This commit is contained in:
parent
076a51d143
commit
73f9094fbb
4 changed files with 21 additions and 14 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
# Semaphore
|
||||
if [ -f /tmp/certbot-lock ]; then
|
||||
echo "[CERTBOT_JOB] Another process is running"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
@ -25,6 +26,7 @@ for domain in $(cat /scripts/letsencrypt_hosts.txt); do
|
|||
done
|
||||
|
||||
if [ -n "$REQUEST_CERTS" ]; then
|
||||
echo "[CERTBOT_JOB] Requesting certificates for $REQUEST_CERTS"
|
||||
certbot certonly \
|
||||
--standalone \
|
||||
--preferred-challenges http \
|
||||
|
|
@ -39,8 +41,9 @@ if [ -n "$REQUEST_CERTS" ]; then
|
|||
fi
|
||||
|
||||
if [ -n "$RENEW_CERTS" ]; then
|
||||
echo "[CERTBOT_JOB] Resquesting renew certificated fort $RENEW_CERTS"
|
||||
certbot renew --post-hook "/scripts/certbot_to_haproxy.sh"
|
||||
fi
|
||||
|
||||
# Release semaphore
|
||||
rm /tmp/certbot-lock
|
||||
rm /tmp/certbot-lock
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue