Comparison

util/startup.lua @ 8699:580c13ed0ca1

util.startup: Initialize the 'prosody' global earlier (various things needs the global util.events instance)
author Kim Alvefur <zash@zash.se>
date Thu, 29 Mar 2018 16:36:18 +0200
parent 8698:0499f3da0ec4
child 8712:e9caf447deed
comparison
equal deleted inserted replaced
8698:0499f3da0ec4 8699:580c13ed0ca1
494 end 494 end
495 end 495 end
496 496
497 -- prosodyctl only 497 -- prosodyctl only
498 function startup.prosodyctl() 498 function startup.prosodyctl()
499 startup.init_global_state();
499 startup.read_config(); 500 startup.read_config();
500 startup.init_global_state();
501 startup.setup_plugindir(); 501 startup.setup_plugindir();
502 startup.setup_datadir(); 502 startup.setup_datadir();
503 startup.chdir(); 503 startup.chdir();
504 startup.read_version(); 504 startup.read_version();
505 startup.switch_user(); 505 startup.switch_user();
515 end 515 end
516 516
517 function startup.prosody() 517 function startup.prosody()
518 -- These actions are in a strict order, as many depend on 518 -- These actions are in a strict order, as many depend on
519 -- previous steps to have already been performed 519 -- previous steps to have already been performed
520 startup.init_global_state();
520 startup.read_config(); 521 startup.read_config();
521 startup.sanity_check(); 522 startup.sanity_check();
522 startup.sandbox_require(); 523 startup.sandbox_require();
523 startup.set_function_metatable(); 524 startup.set_function_metatable();
524 startup.check_dependencies(); 525 startup.check_dependencies();
525 startup.load_libraries(); 526 startup.load_libraries();
526 startup.init_global_state();
527 startup.setup_plugindir(); 527 startup.setup_plugindir();
528 startup.setup_datadir(); 528 startup.setup_datadir();
529 startup.init_logging(); 529 startup.init_logging();
530 startup.chdir(); 530 startup.chdir();
531 startup.add_global_prosody_functions(); 531 startup.add_global_prosody_functions();