#!/usr/bin/lua --[[ Alpine Wall Copyright (C) 2012 Kaarle Ritvanen Licensed under the terms of GPL2 ]]--
require 'lfs' require 'stringy' testmode = stringy.endswith(arg[0], '/awall-cli') if testmode then path = string.sub(arg[0], 1, -11) lfs.chdir(path) end
require 'awall'
awall.loadmodules(testmode and '.')
config = awall.Config.new(testmode and {'json', 'input'})
config:test()
config:dump(testmode and 'output', testmode and 'output/ipset')