Skip to content

Commit

Permalink
Changed to LINK_CONTAINERS
Browse files Browse the repository at this point in the history
  • Loading branch information
madharjan committed May 21, 2019
1 parent 92f65c5 commit bbbea0f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions bin/odoo-systemd-unit
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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
Expand Down

0 comments on commit bbbea0f

Please sign in to comment.