Commit 4e6cf81a authored by Kaarle Ritvanen's avatar Kaarle Ritvanen

prefix ipset files in development mode

parent 46b9807c
......@@ -143,7 +143,7 @@ function M.Config:print()
end
function M.Config:dump(dir)
self.ipset:dump(dir or '/etc/ipset.d')
self.ipset:dump(dir and dir..'/ipset-' or '/etc/ipset.d/')
self.iptables:dump(dir or '/etc/iptables')
end
......
......@@ -31,9 +31,9 @@ function IPSet:print()
end
end
function IPSet:dump(ipsdir)
function IPSet:dump(prefix)
for name, ipset in pairs(self.config) do
local fname = ipsdir..'/'..name
local fname = prefix..name
local file = io.open(fname)
if not file then
file = io.open(fname, 'w')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment