acme: Change boot init script logic to invoke start

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>
This commit is contained in:
Toke Høiland-Jørgensen 2018-05-07 11:48:26 +02:00
parent f73f39eed1
commit 7e1dfc2dc5
3 changed files with 4 additions and 2 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=acme PKG_NAME:=acme
PKG_VERSION:=2.7.8 PKG_VERSION:=2.7.8
PKG_RELEASE:=2 PKG_RELEASE:=3
PKG_LICENSE:=GPLv3 PKG_LICENSE:=GPLv3
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git

View File

@ -25,7 +25,8 @@ stop_service() {
} }
boot() { boot() {
$SCRIPT check_cron touch "/var/run/acme_boot"
start
} }
service_triggers() service_triggers()

View File

@ -234,6 +234,7 @@ load_vars()
check_cron check_cron
[ -n "$CHECK_CRON" ] && exit 0 [ -n "$CHECK_CRON" ] && exit 0
[ -e "/var/run/acme_boot" ] && rm -f "/var/run/acme_boot" && exit 0
config_load acme config_load acme
config_foreach load_vars acme config_foreach load_vars acme