blob: 9fdd1375907b8bd43610cd8495d416097d4b1d2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/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 '.')
if testmode then
awall.confdirs = {'json', 'input'}
awall.iptdir = 'output'
awall.ipsfile = 'output/ipset'
end
awall.translate()
|