Software /
code /
prosody
Comparison
util/startup.lua @ 8667:a05d36075c6a
util.startup: Fix variable usage [luacheck]
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 22 Mar 2018 21:47:16 +0000 |
parent | 8666:57780ba1938f |
child | 8672:86b12ae8d427 |
comparison
equal
deleted
inserted
replaced
8666:57780ba1938f | 8667:a05d36075c6a |
---|---|
396 if not switched_user then | 396 if not switched_user then |
397 -- Boo! | 397 -- Boo! |
398 print("Warning: Couldn't switch to Prosody user/group '"..tostring(desired_user).."'/'"..tostring(desired_group).."': "..tostring(err)); | 398 print("Warning: Couldn't switch to Prosody user/group '"..tostring(desired_user).."'/'"..tostring(desired_group).."': "..tostring(err)); |
399 else | 399 else |
400 -- Make sure the Prosody user can read the config | 400 -- Make sure the Prosody user can read the config |
401 local conf, err, errno = io.open(ENV_CONFIG); | 401 local conf, err, errno = io.open(prosody.config_file); |
402 if conf then | 402 if conf then |
403 conf:close(); | 403 conf:close(); |
404 else | 404 else |
405 print("The config file is not readable by the '"..desired_user.."' user."); | 405 print("The config file is not readable by the '"..desired_user.."' user."); |
406 print("Prosody will not be able to read it."); | 406 print("Prosody will not be able to read it."); |
410 end | 410 end |
411 end | 411 end |
412 | 412 |
413 -- Set our umask to protect data files | 413 -- Set our umask to protect data files |
414 pposix.umask(config.get("*", "umask") or "027"); | 414 pposix.umask(config.get("*", "umask") or "027"); |
415 pposix.setenv("HOME", data_path); | 415 pposix.setenv("HOME", prosody.paths.data); |
416 pposix.setenv("PROSODY_CONFIG", ENV_CONFIG); | 416 pposix.setenv("PROSODY_CONFIG", prosody.config_file); |
417 else | 417 else |
418 print("Error: Unable to load pposix module. Check that Prosody is installed correctly.") | 418 print("Error: Unable to load pposix module. Check that Prosody is installed correctly.") |
419 print("For more help send the below error to us through https://prosody.im/discuss"); | 419 print("For more help send the below error to us through https://prosody.im/discuss"); |
420 print(tostring(pposix)) | 420 print(tostring(pposix)) |
421 os.exit(1); | 421 os.exit(1); |