wlan-ap-Telecominfraproject/patches/wlan-ap/0012-uhttp-adds-the-deployed-option.patch
John Crispin 43573f67e8 opensync: stop and disable the webserver
Once the AP connected to the cloud for the first time we wait 5 minutes.
Once that period is over we stop and disable the webserver. It is only
intended for initial WAN bringup during deployment.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-29 14:17:39 +02:00

32 lines
936 B
Diff

From c59c6aa6209dc52d2b3fbf39cd21b2c57b42820a Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Wed, 29 Jul 2020 14:11:39 +0200
Subject: [PATCH] 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