When using uhttpd (the default), protect NUT CGI via HTTP Basic Auth. Signed-off-by: Daniel Dickinson <lede@cshore.thecshore.com>
6 lines
149 B
Bash
6 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
|
|
}
|