From 79a96e236c927803a943e2d38a2bb7ac7410d065 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 9 Jan 2013 22:01:52 +0100 Subject: prosodyctl, prosody: Pass the selected config file from prosodyctl to prosody --- prosodyctl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'prosodyctl') diff --git a/prosodyctl b/prosodyctl index 25acbc6a..0d1194f4 100755 --- a/prosodyctl +++ b/prosodyctl @@ -61,6 +61,7 @@ end config = require "core.configmanager" +local ENV_CONFIG; do local filenames = {}; @@ -81,6 +82,7 @@ do local file = io.open(filename); if file then file:close(); + ENV_CONFIG = filename; CFG_CONFIGDIR = filename:match("^(.*)[\\/][^\\/]*$"); break; end @@ -162,6 +164,7 @@ if ok and pposix then -- Set our umask to protect data files pposix.umask(config.get("*", "core", "umask") or "027"); pposix.setenv("HOME", data_path); + pposix.setenv("PROSODY_CONFIG", ENV_CONFIG); else print("Error: Unable to load pposix module. Check that Prosody is installed correctly.") print("For more help send the below error to us through http://prosody.im/discuss"); -- cgit v1.2.3