util.startup: Back out 598df17b8ebb
Broke signal handling again, such that an early s2s connection results
in libunbound catching signals and getting Prosody killed on e.g. SIGHUP
This returns to the situation where prosody --daemonize does not respond
to signals.
-- 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