aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2019-11-07 11:40:31 +0100
committerJohn Crispin <john@phrozen.org>2020-01-15 20:16:42 +0100
commitee2014e68019c4150b9dda0cf9f140cdf6faada9 (patch)
tree0c9d12d0b4a5392582553ab7715c0d796d3605f2 /package/network
parent0fcb4a39813c153669cb5fee552e74ffb24ed42e (diff)
downloadupstream-ee2014e68019c4150b9dda0cf9f140cdf6faada9.tar.gz
upstream-ee2014e68019c4150b9dda0cf9f140cdf6faada9.tar.bz2
upstream-ee2014e68019c4150b9dda0cf9f140cdf6faada9.zip
uhttpd: add enable instance option
With this change it is now possible to switch off single instances of the uhttpd config. Until now it was only possible to switch all instances of uhttpd on or off. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'package/network')
-rw-r--r--package/network/services/uhttpd/Makefile2
-rwxr-xr-xpackage/network/services/uhttpd/files/uhttpd.init4
2 files changed, 5 insertions, 1 deletions
diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile
index 36dbe636ae..daa5667854 100644
--- a/package/network/services/uhttpd/Makefile
+++ b/package/network/services/uhttpd/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=uhttpd
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git
diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init
index 6322473b97..869f79bea2 100755
--- a/package/network/services/uhttpd/files/uhttpd.init
+++ b/package/network/services/uhttpd/files/uhttpd.init
@@ -98,6 +98,10 @@ start_instance()
local cfg="$1"
local realm="$(uci_get system.@system[0].hostname)"
local listen http https interpreter indexes path handler httpdconf haveauth
+ local enabled
+
+ config_get_bool enabled "$cfg" 'enabled' 1
+ [ $enabled -gt 0 ] || return
procd_open_instance
procd_set_param respawn