diff --git a/lib/lns.lua b/lib/lns.lua index 2f702d7..0bee2bd 100644 --- a/lib/lns.lua +++ b/lib/lns.lua @@ -1,4 +1,5 @@ local cache = {} +local cache_file = "/var/cache/lns_cache.db" settings.define("lns_client.allow_dynamic_lns_hosts", { description = "Allow dynamic LNS hosts", @@ -14,8 +15,8 @@ settings.define("lns_client.lns_server", { function _load_cache() - if fs.exists("lns_cache.db") then - db = fs.open("lns_cache.db", "r") + if fs.exists(cache_file) then + db = fs.open(cache_file, "r") db_contents = db.readAll() db.close() @@ -24,7 +25,7 @@ function _load_cache() end function _save_cache() - db = fs.open("lns_cache.db", "w") + db = fs.open(cache_file, "w") db.write(textutils.serialize(cache)) db.close() end