Added new package
This commit is contained in:
14
usr/bin/dns.lua
Normal file
14
usr/bin/dns.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
local ocdns = require("ocdns")
|
||||
|
||||
local name = ...
|
||||
if not name then
|
||||
io.stderr:write("Usage: resolve <hostname>\n")
|
||||
return
|
||||
end
|
||||
|
||||
local uuid, err = ocdns.resolve(name)
|
||||
if uuid then
|
||||
print(uuid)
|
||||
else
|
||||
print("error:", err)
|
||||
end
|
||||
Reference in New Issue
Block a user