diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2012-04-09 06:48:53 +0000 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2012-04-09 06:48:53 +0000 |
commit | bdc0328ab8f0335adf616dd65545263a39e16434 (patch) | |
tree | 87beb8b666924dd274cd8301b487dad11bf2b219 /awall-cli | |
parent | 2b3db7b4c3f0336126f0530b3fa9a184c8008306 (diff) | |
download | awall-bdc0328ab8f0335adf616dd65545263a39e16434.tar.bz2 awall-bdc0328ab8f0335adf616dd65545263a39e16434.tar.xz |
optional, importable configuration files
Diffstat (limited to 'awall-cli')
-rwxr-xr-x | awall-cli | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -19,15 +19,18 @@ long_opts = {activate='a', if stringy.endswith(arg[0], '/awall-cli') then basedir = string.sub(arg[0], 1, -11) input = {basedir..'/json'} + import = {} - short_opts = short_opts..'i:' + short_opts = short_opts..'i:I:' long_opts['input-dir'] = 'i' + long_opts['import-path'] = 'I' end for switch, value in pairs(alt_getopt.get_opts(arg, short_opts, long_opts)) do if switch == 'a' then activate = true elseif switch == 'F' then fallback = true elseif switch == 'i' then table.insert(input, value) + elseif switch == 'I' then table.insert(import, value) elseif switch == 'o' then iptdir = value ipsfile = value..'/ipset' @@ -40,7 +43,7 @@ require 'awall' require 'awall.iptables' awall.loadmodules(basedir) -config = awall.Config.new(input) +config = awall.Config.new(input, import) if activate then |