From efa3babe54ae7cc1131b0ecbd229f484b8004ff4 Mon Sep 17 00:00:00 2001 From: Nicolas KAROLAK <nicolas@karolak.fr> Date: Fri, 19 Jan 2018 17:31:00 +0100 Subject: [PATCH] add db_port --- 2.Common_services/3.PostgreSQL/0_setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/2.Common_services/3.PostgreSQL/0_setup.py b/2.Common_services/3.PostgreSQL/0_setup.py index 6a22701e..0411cb08 100644 --- a/2.Common_services/3.PostgreSQL/0_setup.py +++ b/2.Common_services/3.PostgreSQL/0_setup.py @@ -5,8 +5,9 @@ import utils def setup(interactive=True): db_host = utils.get_conf('DB_HOST') - if db_host and not db_host.startswith('127') and db_host != 'localhost': - utils.log('Skipping postgresql setup because the database host is set to "%s".' % db_host) + db_port = utils.get_conf('DB_PORT') + if (db_host and not db_host.startswith('127') and db_host != 'localhost') or db_port != 5432: + utils.log('Skipping postgresql setup because the database host is set to "%s:%i".' % (db_host, db_port)) return cmds = [ 'DEBIAN_FRONTEND=noninteractive apt-get install -y postgresql', -- GitLab