util.startup: Fix variable usage [luacheck]
authorMatthew Wild <mwild1@gmail.com>
Thu, 22 Mar 2018 21:47:16 +0000
changeset 8670 a05d36075c6a
parent 8669 57780ba1938f
child 8671 31c5abd49dfe
util.startup: Fix variable usage [luacheck]
util/startup.lua
--- a/util/startup.lua	Thu Mar 22 21:46:55 2018 +0000
+++ b/util/startup.lua	Thu Mar 22 21:47:16 2018 +0000
@@ -398,7 +398,7 @@
 				print("Warning: Couldn't switch to Prosody user/group '"..tostring(desired_user).."'/'"..tostring(desired_group).."': "..tostring(err));
 			else
 				-- Make sure the Prosody user can read the config
-				local conf, err, errno = io.open(ENV_CONFIG);
+				local conf, err, errno = io.open(prosody.config_file);
 				if conf then
 					conf:close();
 				else
@@ -412,8 +412,8 @@
 
 		-- Set our umask to protect data files
 		pposix.umask(config.get("*", "umask") or "027");
-		pposix.setenv("HOME", data_path);
-		pposix.setenv("PROSODY_CONFIG", ENV_CONFIG);
+		pposix.setenv("HOME", prosody.paths.data);
+		pposix.setenv("PROSODY_CONFIG", prosody.config_file);
 	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 https://prosody.im/discuss");