wlan-ap-Telecominfraproject/patches-20.x/0016-uhttp-adds-the-deployed-option.patch
John Crispin a6a28f5aab openwrt-20.x: add support for latest 20.x
This is opt-in and we continue to use the 19.07 tree as the default.

Signed-off-by: John Crispin <john@phrozen.org>
2020-12-02 12:14:16 +01:00

32 lines
942 B
Diff

From c77970b0f266ab7213e568b704080e90023c0f44 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Wed, 29 Jul 2020 14:11:39 +0200
Subject: [PATCH 16/25] 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 869f79bea2..001ca5ee0f 100755
--- a/package/network/services/uhttpd/files/uhttpd.init
+++ b/package/network/services/uhttpd/files/uhttpd.init
@@ -211,3 +211,10 @@ start_service() {
config_load uhttpd
config_foreach start_instance uhttpd
}
+
+boot() {
+ local deployed=$(uci get uhttpd.main.deployed)
+
+ [ "$deployed" -eq 1 ] && return 0
+ start $@
+}
--
2.25.1