use system uuid

This commit is contained in:
2023-11-06 01:22:29 +08:00
parent 0642bedbf3
commit 8708d0e2f7
6 changed files with 23 additions and 8 deletions
+15
View File
@@ -0,0 +1,15 @@
local function uuid()
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
return uuid