mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-30 18:07:52 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From 8ba5feb6aaba50bda126db027490c7d37e428e3b Mon Sep 17 00:00:00 2001
 | |
| From: Stijn Tintel <stijn@linux-ipv6.be>
 | |
| Date: Fri, 20 Aug 2021 16:11:12 +0300
 | |
| Subject: [PATCH 15/27] 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 is currently not possible as it would render all other uhttpd
 | |
| instances unusable.
 | |
| 
 | |
| Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
 | |
| ---
 | |
|  package/network/services/uhttpd/files/uhttpd.init | 3 ++-
 | |
|  1 file changed, 2 insertions(+), 1 deletion(-)
 | |
| 
 | |
| diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init
 | |
| index 869f79bea2..7020912c6c 100755
 | |
| --- a/package/network/services/uhttpd/files/uhttpd.init
 | |
| +++ b/package/network/services/uhttpd/files/uhttpd.init
 | |
| @@ -195,7 +195,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
 | |
|  
 | |
| -- 
 | |
| 2.25.1
 | |
| 
 | 
