aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorStijn Tintel <stijn@linux-ipv6.be>2021-08-20 14:33:51 +0300
committerStijn Tintel <stijn@linux-ipv6.be>2021-08-24 14:45:42 +0300
commit6393ea15815e57802377ebecb17edf8ad20a0736 (patch)
treed28e859fbb8d46b546ae77aed1e4f00ed4a7b336 /package/network
parentc0afe3a5d2239fb40aa566e4d81666b4461f07fb (diff)
downloadupstream-6393ea15815e57802377ebecb17edf8ad20a0736.tar.gz
upstream-6393ea15815e57802377ebecb17edf8ad20a0736.tar.bz2
upstream-6393ea15815e57802377ebecb17edf8ad20a0736.zip
uhttpd: add config option for json_script
Add a config option for json_script instead of unconditionally including all json files in /etc/uhttpd in every uhttpd instance. This makes it possible to configure a single instance with an unconditional redirect, which currently renders all other uhttpd instances unusable. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Acked-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/network')
-rw-r--r--package/network/services/uhttpd/Makefile2
-rwxr-xr-xpackage/network/services/uhttpd/files/uhttpd.init3
2 files changed, 3 insertions, 2 deletions
diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile
index 781512bd99..dce5aa87b8 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:=2
+PKG_RELEASE:=3
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 e7709941c2..30fd7b4259 100755
--- a/package/network/services/uhttpd/files/uhttpd.init
+++ b/package/network/services/uhttpd/files/uhttpd.init
@@ -196,7 +196,8 @@ start_instance()
append_bool "$cfg" redirect_https "-q" 0
}
- for file in /etc/uhttpd/*.json; do
+ config_get json_script "$cfg" json_script
+ for file in $json_script; do
[ -s "$file" ] && procd_append_param command -H "$file"
done