X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=applications%2Fluci-app-firewall%2Fluasrc%2Fmodel%2Fcbi%2Ffirewall%2Fcustom.lua;h=2b3cee328378d1995c96e5f87b34d9518a98f0c0;hb=8f62b28948f8b24f1eb8239074a19d868a02cad6;hp=9b53a8a62f83efc05444d2160c0904cba8b36ca2;hpb=1bb4822dca6113f73e3bc89e2acf15935e6f8e92;p=project%2Fluci.git 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 9b53a8a62..2b3cee328 100644 --- a/applications/luci-app-firewall/luasrc/model/cbi/firewall/custom.lua +++ b/applications/luci-app-firewall/luasrc/model/cbi/firewall/custom.lua @@ -1,16 +1,5 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2011 Jo-Philipp Wich - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -$Id$ -]]-- +-- Copyright 2011 Jo-Philipp Wich +-- Licensed to the public under the Apache License 2.0. local fs = require "nixio.fs" @@ -33,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