# HG changeset patch # User Kim Alvefur <zash@zash.se> # Date 1658788756 -7200 # Node ID d580e6a57cbba9e601e4ca5afbabc689ffbaeb95 # Parent 4c8941b5b05ebf1818d2191b1bdc695feeab8f7d 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 diff -r 4c8941b5b05e -r d580e6a57cbb plugins/mod_storage_sql.lua --- 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);