aboutsummaryrefslogtreecommitdiff
path: root/net/acme-common/files/acme-notify.sh
diff options
context:
space:
mode:
authorToke Høiland-Jørgensen <toke@toke.dk>2022-10-24 12:53:43 +0200
committerGitHub <noreply@github.com>2022-10-24 12:53:43 +0200
commit14f151ac9c075ec6b634b322535154342ac9efa7 (patch)
treec276bd7701ccbcaf422e40e8d6cefed550cc43f5 /net/acme-common/files/acme-notify.sh
parente90b4c01e1619ce4adf16abb9f63c772b44fefe9 (diff)
parent230c2d5fc423c28eb9fa8e3fa5a2bd3e626de87e (diff)
Merge pull request #19669 from hgl/acme
acme: refactor
Diffstat (limited to 'net/acme-common/files/acme-notify.sh')
-rw-r--r--net/acme-common/files/acme-notify.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/net/acme-common/files/acme-notify.sh b/net/acme-common/files/acme-notify.sh
new file mode 100644
index 000000000..4f06f9412
--- /dev/null
+++ b/net/acme-common/files/acme-notify.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+set -u
+
+event="$1"
+
+# Call hotplug first, giving scripts a chance to modify certificates before
+# reloadaing the services
+ACTION=$event hotplug-call acme
+
+case $event in
+renewed)
+ ubus call service event '{"type":"acme.renew","data":{}}'
+ ;;
+issued)
+ ubus call service event '{"type":"acme.issue","data":{}}'
+ ;;
+esac