Files
wlan-ap/patches/0019-uhttp-adds-the-deployed-option.patch
John Crispin 2837dc61e6 patches: move all patches into a single folder
This allows easier managing of updated patches.

Signed-off-by: John Crispin <john@phrozen.org>
2020-09-22 18:20:11 +02:00

32 lines
942 B
Diff

From a5852761c39b2a00337984ad49bfdb7beeb15f75 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/30] 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..5e57bd66da 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 uhttpd.main.deployed)
+
+ [ "$deployed" -eq 1 ] && return 0
+ start $@
+}
--
2.25.1