0
0
mirror of https://github.com/openwrt/packages.git synced 2025-01-31 03:41:44 +00:00
packages/net/nut/files/add_nut_httpd_conf
Daniel Dickinson c1d26bacdf net/nut: Protect CGI via HTTP Basic Auth
When using uhttpd (the default), protect NUT CGI
via HTTP Basic Auth.

Signed-off-by: Daniel Dickinson <lede@cshore.thecshore.com>
2017-01-11 18:54:16 -05:00

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
}