aboutsummaryrefslogtreecommitdiffstats
path: root/roles/web/templates/acme/renew.sh.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/web/templates/acme/renew.sh.j2')
-rw-r--r--roles/web/templates/acme/renew.sh.j217
1 files changed, 17 insertions, 0 deletions
diff --git a/roles/web/templates/acme/renew.sh.j2 b/roles/web/templates/acme/renew.sh.j2
new file mode 100644
index 0000000..33d5879
--- /dev/null
+++ b/roles/web/templates/acme/renew.sh.j2
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# Renew 'acme.sh' issued certificates.
+#
+# Aaron LI
+# 2019-10-03
+#
+
+[ $(id -u) -eq 0 ] || {
+ echo "ERROR: must be run by root!"
+ exit 1
+}
+
+su - acme \
+ -c "acme.sh --cron --log /var/log/acme.sh.log \
+ --config-home {{ web.acme_home }}/.acme.sh \
+ --cert-home {{ web.acme_home }}/certs"