mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-05 08:42:11 +01:00
16 lines
342 B
Plaintext
Executable File
16 lines
342 B
Plaintext
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))
|