acme: Change boot init script logic to invoke start
authorToke Høiland-Jørgensen <toke@toke.dk>
Mon, 7 May 2018 09:48:26 +0000 (11:48 +0200)
committerToke Høiland-Jørgensen <toke@toke.dk>
Mon, 7 May 2018 09:48:26 +0000 (11:48 +0200)
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>
net/acme/Makefile
net/acme/files/acme.init
net/acme/files/run.sh

index 7163ef6a67e3ac972e68b7e4422959be458d05e3..205b5f122b97d984f2b00d3163ee7b61a40e031b 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=acme
 PKG_VERSION:=2.7.8
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=GPLv3
 
 PKG_SOURCE_PROTO:=git
index 6de12b7d05f235109129d3846ac827bfac5ab0a1..a3d686dc7cc6e4236ca4c75b4f68273ec0e9a665 100644 (file)
@@ -25,7 +25,8 @@ stop_service() {
 }
 
 boot() {
-    $SCRIPT check_cron
+    touch "/var/run/acme_boot"
+    start
 }
 
 service_triggers()
index a3a89ab97a7870e9093d99802211b24dca6927af..368de26d37393e94f5ac28e667500a25d9fe172e 100644 (file)
@@ -234,6 +234,7 @@ load_vars()
 
 check_cron
 [ -n "$CHECK_CRON" ] && exit 0
+[ -e "/var/run/acme_boot" ] && rm -f "/var/run/acme_boot" && exit 0
 
 config_load acme
 config_foreach load_vars acme