Skip to content

Commit

Permalink
Enable ssl flag to connect MongoDB
Browse files Browse the repository at this point in the history
  • Loading branch information
motomux committed Jul 14, 2017
1 parent 74a7fa8 commit 55f82e2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions kadira-rma/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ if [[ -z $MONGO_SHARD ]]; then
exit 1
fi

SSL_FLAG=""
if [[ $MONGO_SSL == true ]]; then
SSL_FLAG="--ssl"
fi

ENV_FILE_NAME="env-$PROFILE-$PROVIDER.js"

dumpEnvVarsTo() {
Expand All @@ -50,9 +55,9 @@ while [[ true ]]; do
dumpEnvVarsTo $ENV_FILE_NAME
set -x;
if [ -z ${START_TIME+x} ] || [ -z ${END_TIME+x} ]; then
mongo $(pick-mongo-primary $MONGO_METRICS_URL) profiles/$PROFILE.js providers/$PROVIDER.js $ENV_FILE_NAME lib.js mapreduce.js incremental-aggregation.js;
mongo $(pick-mongo-primary $MONGO_METRICS_URL) $SSL_FLAG profiles/$PROFILE.js providers/$PROVIDER.js $ENV_FILE_NAME lib.js mapreduce.js incremental-aggregation.js;
else
mongo $(pick-mongo-primary $MONGO_METRICS_URL) profiles/$PROFILE.js providers/$PROVIDER.js $ENV_FILE_NAME lib.js mapreduce.js batch-aggregation.js;
mongo $(pick-mongo-primary $MONGO_METRICS_URL) $SSL_FLAG profiles/$PROFILE.js providers/$PROVIDER.js $ENV_FILE_NAME lib.js mapreduce.js batch-aggregation.js;
fi
set +x;
completedAt=$(date +%s)
Expand Down

0 comments on commit 55f82e2

Please sign in to comment.