aboutsummaryrefslogtreecommitdiff
path: root/net/acme-common/files/acme-notify.sh
diff options
context:
space:
mode:
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