fix
This commit is contained in:
+4
-10
@@ -3,16 +3,10 @@ local _M = {}
|
|||||||
function _M.uuid()
|
function _M.uuid()
|
||||||
local uuid_cmd = "/usr/bin/uuid"
|
local uuid_cmd = "/usr/bin/uuid"
|
||||||
|
|
||||||
local result, _, code = os.execute(uuid_cmd)
|
local handle = io.popen(uuid_cmd)
|
||||||
|
local result = handle:read("*a")
|
||||||
if result and code == 0 then
|
ngx.log(ngx.INFO, "uuid -> ", result)
|
||||||
ngx.log(ngx.INFO, "uuid -> ", result)
|
return result
|
||||||
return result
|
|
||||||
else
|
|
||||||
ngx.status = 500
|
|
||||||
ngx.log(ngx.ERR, "UUID GENERATION *FAILED*")
|
|
||||||
ngx.exit()
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return _M
|
return _M
|
||||||
Reference in New Issue
Block a user