36 do |
36 do |
37 -- TODO: Check for other formats when we add support for them |
37 -- TODO: Check for other formats when we add support for them |
38 -- Use lfs? Make a new conf/ dir? |
38 -- Use lfs? Make a new conf/ dir? |
39 local ok, level, err = config.load((CFG_CONFIGDIR or ".").."/prosody.cfg.lua"); |
39 local ok, level, err = config.load((CFG_CONFIGDIR or ".").."/prosody.cfg.lua"); |
40 if not ok then |
40 if not ok then |
41 print(""); |
41 print("\n"); |
42 print("**************************"); |
42 print("**************************"); |
43 if level == "parser" then |
43 if level == "parser" then |
44 print("A problem occured while reading the config file "..(CFG_CONFIGDIR or ".").."/prosody.cfg.lua"); |
44 print("A problem occured while reading the config file "..(CFG_CONFIGDIR or ".").."/prosody.cfg.lua"); |
45 local err_line, err_message = tostring(err):match("%[string .-%]:(%d*): (.*)"); |
45 local err_line, err_message = tostring(err):match("%[string .-%]:(%d*): (.*)"); |
46 print("Error"..(err_line and (" on line "..err_line) or "")..": "..(err_message or tostring(err))); |
46 print("Error"..(err_line and (" on line "..err_line) or "")..": "..(err_message or tostring(err))); |