mirror of
				https://github.com/openwrt/packages.git
				synced 2025-11-04 06:59:42 +00:00 
			
		
		
		
	When using uhttpd (the default), protect NUT CGI via HTTP Basic Auth. Signed-off-by: Daniel Dickinson <lede@cshore.thecshore.com>
		
			
				
	
	
		
			7 lines
		
	
	
		
			149 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			7 lines
		
	
	
		
			149 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/bin/sh
 | 
						|
 | 
						|
grep -q '/cgi-bin/nut' /etc/httpd.conf 2>/dev/null || {
 | 
						|
	echo '/cgi-bin/nut:root:$p$root' >>/etc/httpd.conf
 | 
						|
	/etc/init.d/uhttpd restart
 | 
						|
}
 |