From 7ccd5107456748ee546ee7f5192d4b18c0bc6b7c Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 17 Mar 2020 10:02:01 +1000 Subject: Load the local config file first, then let it be overridden by system and home config files. Also log the loaded config file when doing web stuff as well. --- src/sledjchisl/sledjchisl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sledjchisl') diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index b5dfc97..6acd4a8 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -4385,11 +4385,11 @@ jit library is loaded or the JIT compiler will not be activated. // Load the config scripts. char *cPaths[] = { + ".sledjChisl.conf.lua", "/etc/sledjChisl.conf.lua", // "/etc/sledjChisl.d/*.lua", "~/.sledjChisl.conf.lua", // "~/.config/sledjChisl/*.lua", - ".sledjChisl.conf.lua", NULL }; struct stat st; @@ -4404,7 +4404,7 @@ jit library is loaded or the JIT compiler will not be activated. snprintf(toybuf, sizeof(toybuf), "%s/%s", pwd, cPaths[i]); if (0 != lstat(toybuf, &st)) continue; - if (!isWeb) I("Loading configuration file - %s", toybuf); + I("Loading configuration file - %s", toybuf); status = luaL_loadfile(L, toybuf); if (status) // If something went wrong, error message is at the top of the stack. E("Couldn't load file: %s", lua_tostring(L, -1)); -- cgit v1.1