Diff

plugins/mod_storage_sql.lua @ 12592:d580e6a57cbb 0.12

mod_storage_sql: Fix bypass of load procedure under prosodyctl There's no 'prosody.prosodyctl' property other than this one, introduced in 6216743c188c in 2015. Guessing that the intent was to skip this when running as a prosodyctl command. The module.command code does its own version of this initialization, so this seems likely. Thanks raja for noticing
author Kim Alvefur <zash@zash.se>
date Tue, 26 Jul 2022 00:39:16 +0200
parent 11971:0b350909da24
child 12595:0572b6e604a3
child 12599:5aafcf6a0730
line wrap: on
line diff
--- a/plugins/mod_storage_sql.lua	Mon Jun 27 01:22:36 2022 +0200
+++ b/plugins/mod_storage_sql.lua	Tue Jul 26 00:39:16 2022 +0200
@@ -833,7 +833,7 @@
 end
 
 function module.load()
-	if prosody.prosodyctl then return; end
+	if prosody.process_type == "prosodyctl" then return; end
 	local engines = module:shared("/*/sql/connections");
 	local params = normalize_params(module:get_option("sql", default_params));
 	local db_uri = sql.db2uri(params);