Files
wlan-ap/patches/0019-uhttp-adds-the-deployed-option.patch
John Crispin 7ae17f821b ipq807x: update kernel patches and add new boards
Signed-off-by: John Crispin <john@phrozen.org>
2021-01-18 08:03:29 +01:00

32 lines
941 B
Diff

From 4401ae30fdc549cb9aa541256d39304c85f05d9c Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Wed, 29 Jul 2020 14:11:39 +0200
Subject: [PATCH 19/40] uhttp: adds the deployed option
This allows us to make sure the webui is not automatically started if the
unit is already deployed.
Signed-off-by: John Crispin <john@phrozen.org>
---
package/network/services/uhttpd/files/uhttpd.init | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init
index 6322473b97..8dbc3849b7 100755
--- a/package/network/services/uhttpd/files/uhttpd.init
+++ b/package/network/services/uhttpd/files/uhttpd.init
@@ -207,3 +207,10 @@ start_service() {
config_load uhttpd
config_foreach start_instance uhttpd
}
+
+boot() {
+ local deployed=$(uci get system.tip.deployed)
+
+ [ "$deployed" -eq 1 ] && return 0
+ start $@
+}
--
2.25.1