From 6fad55b4cb853d425f5ac84444a2eb8829418aa3 Mon Sep 17 00:00:00 2001 From: Maycon Santos Date: Mon, 20 Dec 2021 16:45:33 +0100 Subject: [PATCH] Fixx cron (#15) * fix crontab filename and expression * log to stdout --- docker/init_cert.sh | 4 ++-- docker/supervisord.conf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/init_cert.sh b/docker/init_cert.sh index a8398b5..976bdf7 100644 --- a/docker/init_cert.sh +++ b/docker/init_cert.sh @@ -13,10 +13,10 @@ fi # this also updates the nginx config file with new SSL entries certbot -n --nginx --agree-tos --email ${LETSENCRYPT_EMAIL} -d ${LETSENCRYPT_DOMAIN} --https-port ${NGINX_SSL_PORT} # Add cron job file -cat </etc/crontabs/certbot +cat </etc/crontabs/root PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -0 */12 * * * root certbot -q renew --nginx --https-port ${NGINX_SSL_PORT} +0 */12 * * * certbot -q renew --nginx --https-port ${NGINX_SSL_PORT} EOF # start cron daemon supervisorctl start cron diff --git a/docker/supervisord.conf b/docker/supervisord.conf index ced5d27..d66489a 100644 --- a/docker/supervisord.conf +++ b/docker/supervisord.conf @@ -23,7 +23,7 @@ logfile_maxbytes=0 loglevel=warn [program:cron] -command=crond -f +command=crond -f -d 8 user=root priority=101 numprocs=1