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>
17 lines
340 B
Bash
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
|