diff options
author | Jo-Philipp Wich <jo@mein.io> | 2016-12-20 16:22:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-20 16:22:10 +0100 |
commit | 6456d46fc81b70527286e23b3464bee584108d68 (patch) | |
tree | 3e67bf7cbff8dee49a6a0306e9b29de7a45c171d /applications | |
parent | de4c4a6ff5d11ce035afbae66c79b571d738361f (diff) | |
parent | 0581bd5f0be96e0428c7e9fa2a4f6663e4dbfca1 (diff) |
Merge pull request #889 from feckert/firewall_custom_reload
luci-app-firewall: restart firewall on /etc/firewall.user write
Diffstat (limited to 'applications')
-rw-r--r-- | applications/luci-app-firewall/luasrc/model/cbi/firewall/custom.lua | 4 |
1 files changed, 4 insertions, 0 deletions
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 |