From: Florian Eckert Date: Tue, 20 Dec 2016 10:12:42 +0000 (+0100) Subject: luci-app-firewall: restart firewall on /etc/firewall.user write X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=refs%2Fpull%2F889%2Fhead;p=project%2Fluci.git luci-app-firewall: restart firewall on /etc/firewall.user write Signed-off-by: Florian Eckert --- diff --git a/applications/luci-app-firewall/luasrc/model/cbi/firewall/custom.lua b/applications/luci-app-firewall/luasrc/model/cbi/firewall/custom.lua index 968ac3624f..2b3cee3283 100644 --- a/applications/luci-app-firewall/luasrc/model/cbi/firewall/custom.lua +++ b/applications/luci-app-firewall/luasrc/model/cbi/firewall/custom.lua @@ -22,6 +22,10 @@ end function o.write(self, section, value) value = value:gsub("\r\n?", "\n") fs.writefile("/etc/firewall.user", value) + require("luci.sys").call("/etc/init.d/firewall restart >/dev/null 2<&1") + require("nixio").syslog('info', 'Restarting firewall on custom /etc/firewall.user change') end +f.submit = translate("Restart Firewall") + return f