Software /
code /
prosody
Comparison
util/startup.lua @ 10636:a9c975a0f113
util.startup: expose current process type (prosody/prosodyctl) in the global prosody object
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 28 Jan 2020 12:46:59 +0000 |
parent | 10604:3b0d9919f361 |
child | 10651:1196f1e8d178 |
comparison
equal
deleted
inserted
replaced
10635:675d9fbcbaed | 10636:a9c975a0f113 |
---|---|
587 end | 587 end |
588 end | 588 end |
589 | 589 |
590 -- prosodyctl only | 590 -- prosodyctl only |
591 function startup.prosodyctl() | 591 function startup.prosodyctl() |
592 prosody.process_type = "prosodyctl"; | |
592 startup.parse_args(); | 593 startup.parse_args(); |
593 startup.init_global_state(); | 594 startup.init_global_state(); |
594 startup.read_config(); | 595 startup.read_config(); |
595 startup.force_console_logging(); | 596 startup.force_console_logging(); |
596 startup.init_logging(); | 597 startup.init_logging(); |
609 end | 610 end |
610 | 611 |
611 function startup.prosody() | 612 function startup.prosody() |
612 -- These actions are in a strict order, as many depend on | 613 -- These actions are in a strict order, as many depend on |
613 -- previous steps to have already been performed | 614 -- previous steps to have already been performed |
615 prosody.process_type = "prosody"; | |
614 startup.parse_args(); | 616 startup.parse_args(); |
615 startup.init_global_state(); | 617 startup.init_global_state(); |
616 startup.read_config(); | 618 startup.read_config(); |
617 startup.init_logging(); | 619 startup.init_logging(); |
618 startup.sanity_check(); | 620 startup.sanity_check(); |