packages/net/acme-common/files/acme-notify.sh
Glen Huang 7f04710579 amce: use procd to restart services
Directly calling `/etc/init.d/<service> reload` in a hotplug script can
inadvertently start a stopped service.

Signed-off-by: Glen Huang <i@glenhuang.com>
2022-10-24 10:07:06 +08:00

17 lines
340 B
Bash

#!/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