util.startup: Check root after detecting platform and reading config (thanks SigmaTel71)
Ensures that startup.detect_platform() runs so know whether to use the
POSIX method of checking the current user or something else. Also after
reading the config so we know whether the root override setting is set.
-- Enables SQL query logging
--
-- luacheck: ignore 213/uri
module:set_global();
local engines = module:shared("/*/sql/connections");
for uri, engine in pairs(engines) do
engine:debug(true);
end
setmetatable(engines, {
__newindex = function (t, uri, engine)
engine:debug(true);
rawset(t, uri, engine);
end
});
function module.unload()
setmetatable(engines, nil);
for uri, engine in pairs(engines) do
engine:debug(false);
end
end