From 5c7e796440539c6f9e98e1a0eb52908b5504737a Mon Sep 17 00:00:00 2001 From: Thomas Lynch Date: Wed, 24 Nov 2021 01:10:44 +1100 Subject: [PATCH] remove now unused and unnecessary resolving and hostname functions --- src/libs/utils.lua | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/libs/utils.lua b/src/libs/utils.lua index 8981f97..3e79b89 100644 --- a/src/libs/utils.lua +++ b/src/libs/utils.lua @@ -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']