diff --git a/net/nut/Makefile b/net/nut/Makefile index cc9a5de73..a5773f1f8 100644 --- a/net/nut/Makefile +++ b/net/nut/Makefile @@ -275,6 +275,7 @@ define Package/nut-web-cgi/conffiles /etc/nut/upsstats.html /etc/nut/upsstats-single.html /etc/config/nut_cgi +/etc/httpd.conf endef define Package/nut-web-cgi/install diff --git a/net/nut/files/add_nut_httpd_conf b/net/nut/files/add_nut_httpd_conf new file mode 100644 index 000000000..b8fa847f8 --- /dev/null +++ b/net/nut/files/add_nut_httpd_conf @@ -0,0 +1,6 @@ +#!/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 +}