mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-19 20:46:41 +02:00
15 lines
342 B
Text
Executable file
15 lines
342 B
Text
Executable file
#!/usr/bin/lua5.2
|
|
|
|
local json = require 'cjson'
|
|
local aas = require 'aaudit.server'
|
|
|
|
local req = json.decode(io.read())
|
|
req.remote_ip = (os.getenv("SSH_CLIENT") or ""):match("[^ ]+")
|
|
req.identity = arg[1]
|
|
|
|
local ok, msg, extra = aas.handle(req, io.stdin)
|
|
|
|
local object = extra or {}
|
|
object.ok = ok
|
|
object.msg = msg
|
|
print(json.encode(object))
|