From 00628d75f5dfd1b58f34914b4cc7c77a7c964071 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Thu, 8 Jun 2017 14:52:25 -0400 Subject: [PATCH] run.sh: allow for additional args through env variable "what could possibly go wrong" But since changing the cmd through openshift is not straight forward, this allows me to inject additional parameters to the app. Signed-off-by: Vincent Batts --- run.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/run.sh b/run.sh index f6883bb..2f3336a 100644 --- a/run.sh +++ b/run.sh @@ -4,13 +4,13 @@ binary=${APP_BINARY:-/usr/local/bin/imgsrv} MONGODB_SERVICE_HOST=${MONGODB_SERVICE_HOST:-localhost} MONGODB_SERVICE_PORT=${MONGODB_SERVICE_PORT:-27017} -args="" -if [ ! -z "${DATABASE_USER}" ] ; then - args=" ${args} -mongo-username=$DATABASE_USER " +args=${ARGS:-""} +if [ ! -z "${MONGODB_USER}" ] ; then + args=" ${args} -mongo-username=$MONGODB_USER " fi -if [ ! -z "${DATABASE_PASSWORD}" ] ; then - args=" ${args} -mongo-password=$DATABASE_PASSWORD " +if [ ! -z "${MONGODB_PASSWORD}" ] ; then + args=" ${args} -mongo-password=$MONGODB_PASSWORD " fi if ! echo "${1:-$@}" | grep -q '\-mongo-host' ; then