prosody, prosodyctl: Remove last trace of "core" \o/
authorKim Alvefur <zash@zash.se>
Sat, 23 Mar 2013 14:00:49 +0000 (15:00 +0100)
committerKim Alvefur <zash@zash.se>
Sat, 23 Mar 2013 14:00:49 +0000 (15:00 +0100)
prosody
prosodyctl

diff --git a/prosody b/prosody
index 5802c348ee68995331e36b9969802ad73ef5a369..875140deafedd65a9fb31d22932cf4bfbd9c12be 100755 (executable)
--- a/prosody
+++ b/prosody
@@ -207,8 +207,8 @@ function init_global_state()
        prosody.full_sessions = full_sessions;
        prosody.hosts = hosts;
        
-       local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data";
-       local custom_plugin_paths = config.get("*", "core", "plugin_paths");
+       local data_path = config.get("*", "data_path") or CFG_DATADIR or "data";
+       local custom_plugin_paths = config.get("*", "plugin_paths");
        if custom_plugin_paths then
                local path_sep = package.config:sub(3,3);
                -- path1;path2;path3;defaultpath...
index 0d1194f44131d92e4f8a81d145fd2c6ac20c9207..a8cf0e690565b7d1820d117bdc0a9d6f7bf1d960 100755 (executable)
@@ -109,11 +109,11 @@ do
                os.exit(1);
        end
 end
-local original_logging_config = config.get("*", "core", "log");
-config.set("*", "core", "log", { { levels = { min="info" }, to = "console" } });
+local original_logging_config = config.get("*", "log");
+config.set("*", "log", { { levels = { min="info" }, to = "console" } });
 
-local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data";
-local custom_plugin_paths = config.get("*", "core", "plugin_paths");
+local data_path = config.get("*", "data_path") or CFG_DATADIR or "data";
+local custom_plugin_paths = config.get("*", "plugin_paths");
 if custom_plugin_paths then
        local path_sep = package.config:sub(3,3);
        -- path1;path2;path3;defaultpath...
@@ -142,8 +142,8 @@ if ok and pposix then
        current_uid = pposix.getuid();
        if current_uid == 0 then
                -- We haz root!
-               local desired_user = config.get("*", "core", "prosody_user") or "prosody";
-               local desired_group = config.get("*", "core", "prosody_group") or desired_user;
+               local desired_user = config.get("*", "prosody_user") or "prosody";
+               local desired_group = config.get("*", "prosody_group") or desired_user;
                local ok, err = pposix.setgid(desired_group);
                if ok then
                        ok, err = pposix.initgroups(desired_user);
@@ -162,7 +162,7 @@ if ok and pposix then
        end
        
        -- Set our umask to protect data files
-       pposix.umask(config.get("*", "core", "umask") or "027");
+       pposix.umask(config.get("*", "umask") or "027");
        pposix.setenv("HOME", data_path);
        pposix.setenv("PROSODY_CONFIG", ENV_CONFIG);
 else
@@ -267,7 +267,7 @@ local show_yesno = prosodyctl.show_yesno;
 local show_prompt = prosodyctl.show_prompt;
 local read_password = prosodyctl.read_password;
 
-local prosodyctl_timeout = (config.get("*", "core", "prosodyctl_timeout") or 5) * 2;
+local prosodyctl_timeout = (config.get("*", "prosodyctl_timeout") or 5) * 2;
 -----------------------
 local commands = {};
 local command = arg[1];
@@ -410,7 +410,7 @@ function commands.start(arg)
        
        local ok, ret = prosodyctl.start();
        if ok then
-               if config.get("*", "core", "daemonize") ~= false then
+               if config.get("*", "daemonize") ~= false then
                        local i=1;
                        while true do
                                local ok, running = prosodyctl.isrunning();