Activate renewal of Let's Encrypt certs in CRON. default tip
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 02 May 2024 16:02:45 +0300
changeset 38 5c3fb23b9208
parent 37 f2b49f2d087b
Activate renewal of Let's Encrypt certs in CRON.
deb/apache-letsencrypt.bash
--- a/deb/apache-letsencrypt.bash	Thu May 02 15:55:17 2024 +0300
+++ b/deb/apache-letsencrypt.bash	Thu May 02 16:02:45 2024 +0300
@@ -46,3 +46,24 @@
 LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common
 EOF
 
+cat >/etc/cron.weekly/defun-letsencrypt.bash <<EOF
+#!/bin/bash
+
+certbot certonly --webroot \
+ --agree-tos --non-interactive \
+ -m gavenkoa@gmail.com \
+ -w /srv/www/letsencrypt \
+ --cert-name defun.work \
+ -d defun.work \
+ -d 2048.defun.work \
+ -d blog.defun.work \
+ -d cooking.defun.work \
+ -d gadict.defun.work \
+ -d hg.defun.work \
+ -d resume.defun.work \
+ -d stat.defun.work \
+ -d test.defun.work \
+ -d tips.defun.work
+
+EOF
+chmod a+x /etc/cron.weekly/defun-letsencrypt.bash