Diff

prosodyctl @ 7297:b34a42a10c9f

prosody, prosodyctl: Allow setting CFG_* variables via Lua interpreter before loading Prosody. Fixes #308.
author Matthew Wild <mwild1@gmail.com>
date Fri, 18 Mar 2016 10:24:46 +0000
parent 7267:8ad2dbc4fdb6
child 7302:92d86016e1e3
child 7311:e9526dd3e8fc
line wrap: on
line diff
--- a/prosodyctl	Thu Mar 17 23:15:08 2016 +0000
+++ b/prosodyctl	Fri Mar 18 10:24:46 2016 +0000
@@ -11,10 +11,10 @@
 
 -- Will be modified by configure script if run --
 
-CFG_SOURCEDIR=os.getenv("PROSODY_SRCDIR");
-CFG_CONFIGDIR=os.getenv("PROSODY_CFGDIR");
-CFG_PLUGINDIR=os.getenv("PROSODY_PLUGINDIR");
-CFG_DATADIR=os.getenv("PROSODY_DATADIR");
+CFG_SOURCEDIR=CFG_SOURCEDIR or os.getenv("PROSODY_SRCDIR");
+CFG_CONFIGDIR=CFG_CONFIGDIR or os.getenv("PROSODY_CFGDIR");
+CFG_PLUGINDIR=CFG_PLUGINDIR or os.getenv("PROSODY_PLUGINDIR");
+CFG_DATADIR=CFG_DATADIR or os.getenv("PROSODY_DATADIR");
 
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --