aboutsummaryrefslogtreecommitdiffstats
path: root/900.lfacme.sh
diff options
context:
space:
mode:
authorLexi Winter <ivy@FreeBSD.org>2025-06-04 09:35:37 +0100
committerLexi Winter <ivy@FreeBSD.org>2025-06-04 09:35:37 +0100
commit07e2dff0f3f9b1007b26e28a932b5bc2dc6d5a20 (patch)
tree0de29ad1b2cb55a6f455d9fe75f11df910c129b1 /900.lfacme.sh
parent8356fc09c1bd4a99f38c446e56c8644ae2acfad7 (diff)
downloadlfacme-07e2dff0f3f9b1007b26e28a932b5bc2dc6d5a20.tar.gz
lfacme-07e2dff0f3f9b1007b26e28a932b5bc2dc6d5a20.tar.bz2
add a FreeBSD periodic script
Diffstat (limited to '900.lfacme.sh')
-rw-r--r--900.lfacme.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/900.lfacme.sh b/900.lfacme.sh
new file mode 100644
index 0000000..dabb890
--- /dev/null
+++ b/900.lfacme.sh
@@ -0,0 +1,29 @@
+#! /bin/sh
+# This source code is released into the public domain.
+#
+# Run lfacme-renew to renew ACME certificates.
+
+if [ -r /etc/defaults/periodic.conf ]; then
+ . /etc/defaults/periodic.conf
+ source_periodic_confs
+fi
+
+PATH=$PATH:/usr/local/bin:/usr/local/sbin
+export PATH
+
+# Exit if lfacme isn't installed but the periodic script was left over
+# for some reason.
+if ! [ -x /usr/local/sbin/lfacme-renew ]; then
+ exit 0
+fi
+
+case "$daily_lfacme_enable" in
+[Yy][Ee][Ss])
+ printf 'Renewing ACME certificates with lfacme:\n'
+
+ /usr/local/sbin/lfacme-renew
+ ;;
+
+*)
+ ;;
+esac