fix
This commit is contained in:
+4
-10
@@ -3,16 +3,10 @@ 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
|
||||
local handle = io.popen(uuid_cmd)
|
||||
local result = handle:read("*a")
|
||||
ngx.log(ngx.INFO, "uuid -> ", result)
|
||||
return result
|
||||
end
|
||||
|
||||
return _M
|
||||
Reference in New Issue
Block a user