diff options
Diffstat (limited to 'roles/web/files/600.acme-sh')
-rw-r--r-- | roles/web/files/600.acme-sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/roles/web/files/600.acme-sh b/roles/web/files/600.acme-sh new file mode 100644 index 0000000..fdf4cc4 --- /dev/null +++ b/roles/web/files/600.acme-sh @@ -0,0 +1,27 @@ +#!/bin/sh +# +# Monthly task to renew and deploy acme certificates. + +if [ -r /etc/defaults/periodic.conf ]; then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin + +case "$monthly_acme_sh_enable" in + [Yy][Ee][Ss]) + echo + echo "Checking Let's Encrypt certificates:" + if [ -x "$monthly_acme_sh_renewscript" ]; then + echo "Renewing certificates ..." + $monthly_acme_sh_renewscript + if [ -x "$monthly_acme_sh_deployscript" ]; then + echo "Deploying certificates ..." + $monthly_acme_sh_deployscript + fi + fi + ;; + *) + ;; +esac |