2023-11-06 01:30:36 +08:00
|
|
|
local _M = {}
|
|
|
|
|
|
|
|
|
|
function _M.uuid()
|
2023-11-06 01:22:29 +08:00
|
|
|
local uuid_cmd = "/usr/bin/uuid"
|
|
|
|
|
|
|
|
|
|
local result, _, code = os.execute(uuid_cmd)
|
|
|
|
|
|
|
|
|
|
if result and code == 0 then
|
|
|
|
|
ngx.say(result)
|
|
|
|
|
else
|
|
|
|
|
ngx.status = 500
|
|
|
|
|
ngx.log(ngx.ERR, "UUID GENERATION *FAILED*")
|
|
|
|
|
ngx.exit()
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2023-11-06 01:30:36 +08:00
|
|
|
return _M
|