18 lines
351 B
Lua
18 lines
351 B
Lua
local _M = {}
|
|
|
|
function _M.uuid()
|
|
local uuid_cmd = "/usr/bin/uuid"
|
|
|
|
local result, _, code = os.execute(uuid_cmd)
|
|
|
|
if result and code == 0 then
|
|
ngx.log(ngx.INFO, "uuid -> ", result)
|
|
return result
|
|
else
|
|
ngx.status = 500
|
|
ngx.log(ngx.ERR, "UUID GENERATION *FAILED*")
|
|
ngx.exit()
|
|
end
|
|
end
|
|
|
|
return _M |