remove now unused and unnecessary resolving and hostname functions

This commit is contained in:
Thomas Lynch
2021-11-24 01:10:44 +11:00
parent 0c0fa22d6f
commit 5c7e796440

View File

@ -1,20 +1,5 @@
local _M = {}
function _M.get_hostname()
local handler = io.popen ("/bin/hostname")
local hostname = handler:read("*a") or ""
handler:close()
hostname =string.gsub(hostname, "\n$", "")
return hostname
end
function _M.resolve_fqdn(fqdn)
local handler = io.popen(string.format("dig +short %s | head -1", fqdn))
local result = handler:read("*a")
handler:close()
return result:gsub("\n", "")
end
local secret_bucket_duration = 43200 -- 60 * 60 * 12 -- 12 hours
function _M.generate_secret(context, salt, is_applet)
local start_sec = core.now()['sec']