The new procd config dependency tracking requires the start method to be called even on boot. So add a state file that is checked by the run script to condition the special-case boot run instead of the previous independent call to the run script. Ref: https://github.com/openwrt/luci/pull/1769 Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
35 lines
495 B
Bash
35 lines
495 B
Bash
#!/bin/sh /etc/rc.common
|
|
|
|
USE_PROCD=1
|
|
|
|
START=50
|
|
SCRIPT=/usr/lib/acme/run-acme
|
|
|
|
start_service()
|
|
{
|
|
procd_open_instance
|
|
procd_set_param command $SCRIPT
|
|
procd_set_param file /etc/config/acme
|
|
procd_set_param stdout 1
|
|
procd_set_param stderr 1
|
|
procd_close_instance
|
|
}
|
|
|
|
reload_service() {
|
|
rc_procd start_service "$@"
|
|
return 0
|
|
}
|
|
|
|
stop_service() {
|
|
return 0
|
|
}
|
|
|
|
boot() {
|
|
touch "/var/run/acme_boot"
|
|
start
|
|
}
|
|
|
|
service_triggers()
|
|
{
|
|
procd_add_reload_trigger acme
|
|
}
|