Diff

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
line wrap: on
line diff
--- a/util/startup.lua	Mon Jan 27 22:28:52 2020 +0000
+++ b/util/startup.lua	Tue Jan 28 12:46:59 2020 +0000
@@ -589,6 +589,7 @@
 
 -- prosodyctl only
 function startup.prosodyctl()
+	prosody.process_type = "prosodyctl";
 	startup.parse_args();
 	startup.init_global_state();
 	startup.read_config();
@@ -611,6 +612,7 @@
 function startup.prosody()
 	-- These actions are in a strict order, as many depend on
 	-- previous steps to have already been performed
+	prosody.process_type = "prosody";
 	startup.parse_args();
 	startup.init_global_state();
 	startup.read_config();