From bbbea0f95c107113a356b821a1aa78292a18f831 Mon Sep 17 00:00:00 2001 From: Madharjan Date: Tue, 21 May 2019 22:00:54 +0800 Subject: [PATCH] Changed to LINK_CONTAINERS --- bin/odoo-systemd-unit | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/odoo-systemd-unit b/bin/odoo-systemd-unit index 4a96a87..8c0d9fe 100644 --- a/bin/odoo-systemd-unit +++ b/bin/odoo-systemd-unit @@ -20,7 +20,7 @@ DEF_ODOO_INSTALL_MODULES=website DEF_ODOO_UNINSTALL_MODULES= DEF_ODOO_LANG=en_US -DEF_LINK_DATABASE_CONTAINER= +DEF_LINK_CONTAINERS= PORT=${PORT:-$DEF_PORT} VOLUME_HOME=${VOLUME_HOME:-$DEF_VOLUME_HOME} @@ -34,12 +34,18 @@ ODOO_INSTALL_MODULES=${ODOO_INSTALL_MODULES:-$DEF_ODOO_INSTALL_MODULES} ODOO_UNINSTALL_MODULES=${ODOO_UNINSTALL_MODULES:-$DEF_ODOO_UNINSTALL_MODULES} ODOO_LANG=${ODOO_LANG:-$DEF_ODOO_LANG} -LINK_DATABASE_CONTAINER=${LINK_DATABASE_CONTAINER:-DEF_LINK_DATABASE_CONTAINER} +LINK_CONTAINERS=${LINK_CONTAINERS:-$DEF_LINK_CONTAINERS} -if [ -z ${LINK_DATABASE_CONTAINER} ]; then +if [ -z ${LINK_CONTAINERS} ]; then LINK_LINE="" else - LINK_LINE="--link ${LINK_DATABASE_CONTAINER}:postgresql " + OIFS=$IFS + IFS=',' + for LINK in $LINK_CONTAINERS + do + LINK_LINE="${LINK_LINE} --link ${LINK} " + done + IFS=$OIFS fi if [ -z ${PORT} ]; then