From: Christian Heller Date: Wed, 5 Dec 2018 00:54:23 +0000 (+0100) Subject: Replace unused certbot cronjob with used systemd service. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/static/%7B%7Bitem_name%7D%7D?a=commitdiff_plain;h=acc4cdb47d70491d2e524f7ae72114f286296eda;p=config Replace unused certbot cronjob with used systemd service. --- diff --git a/all_new_2018/linkable_etc_files/web/etc/cron.d/certbot b/all_new_2018/linkable_etc_files/web/etc/cron.d/certbot deleted file mode 100644 index e70c4fa..0000000 --- a/all_new_2018/linkable_etc_files/web/etc/cron.d/certbot +++ /dev/null @@ -1,13 +0,0 @@ -# /etc/cron.d/certbot: crontab entries for the certbot package -# -# Upstream recommends attempting renewal twice a day -# -# Eventually, this will be an opportunity to validate certificates -# haven't been revoked, etc. Renewal will only occur if expiration -# is within 30 days. -SHELL=/bin/sh -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin - -# plomlompom added the --webroot -w /var/www/html/ so that renewal -# works with nginx running. -0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(3600))' && certbot -q renew --webroot -w /var/www/html/ diff --git a/all_new_2018/linkable_etc_files/web/etc/systemd/system/certbot.service b/all_new_2018/linkable_etc_files/web/etc/systemd/system/certbot.service new file mode 100644 index 0000000..122e7c1 --- /dev/null +++ b/all_new_2018/linkable_etc_files/web/etc/systemd/system/certbot.service @@ -0,0 +1,8 @@ +[Unit] +Description=Certbot +Documentation=file:///usr/share/doc/python-certbot-doc/html/index.html +Documentation=https://letsencrypt.readthedocs.io/en/latest/ +[Service] +Type=oneshot +ExecStart=/usr/bin/certbot -q renew --webroot -w /var/www/html/ +PrivateTmp=true