Fixx cron (#15)

* fix crontab filename and expression

* log to stdout
This commit is contained in:
Maycon Santos
2021-12-20 16:45:33 +01:00
committed by GitHub
parent 96a9f581de
commit 6fad55b4cb
2 changed files with 3 additions and 3 deletions

View File

@@ -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 <<EOF >/etc/crontabs/certbot
cat <<EOF >/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

View File

@@ -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