From 915cff1ca5cf30f42320f7762b26fb4ea4b6f67f Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Thu, 15 Sep 2022 11:00:26 +0200 Subject: [PATCH] Custom database port support for automx --- modoboa_installer/scripts/automx.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modoboa_installer/scripts/automx.py b/modoboa_installer/scripts/automx.py index b086e9e..7b9ed56 100644 --- a/modoboa_installer/scripts/automx.py +++ b/modoboa_installer/scripts/automx.py @@ -33,11 +33,12 @@ class Automx(base.Installer): def get_template_context(self): """Additional variables.""" context = super(Automx, self).get_template_context() - sql_dsn = "{}://{}:{}@{}/{}".format( + sql_dsn = "{}://{}:{}@{}:{}/{}".format( "postgresql" if self.dbengine == "postgres" else self.dbengine, self.config.get("modoboa", "dbuser"), self.config.get("modoboa", "dbpassword"), self.dbhost, + self.dbport, self.config.get("modoboa", "dbname")) if self.db_driver == "pgsql": sql_query = (