mirror of
https://github.com/openwrt/packages.git
synced 2025-01-31 03:41:44 +00:00
c1d26bacdf
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
|
|
}
|