Fix error checking of optional parameter storage-engine-cache-size

- Keep the parameter optional
- Remove redundant checking of the same parameter
- Do not exit if the parameter is not specified
This commit is contained in:
muawiakh 2018-01-04 13:58:28 +01:00
parent 0b885efc85
commit e2316a3de8
3 changed files with 5 additions and 6 deletions

View File

@ -1,4 +1,4 @@
FROM mongo:3.4.4 FROM mongo:3.4.10
LABEL maintainer "dev@bigchaindb.com" LABEL maintainer "dev@bigchaindb.com"
WORKDIR / WORKDIR /
RUN apt-get update \ RUN apt-get update \

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
docker build -t bigchaindb/mongodb:3.2 . docker build -t bigchaindb/mongodb:3.3 .
docker push bigchaindb/mongodb:3.2 docker push bigchaindb/mongodb:3.3

View File

@ -65,9 +65,8 @@ if [[ -z "${REPLICA_SET_NAME:?REPLICA_SET_NAME not specified. Exiting!}" || \
-z "${MONGODB_IP:?MONGODB_IP not specified. Exiting!}" || \ -z "${MONGODB_IP:?MONGODB_IP not specified. Exiting!}" || \
-z "${MONGODB_KEY_FILE_PATH:?MONGODB_KEY_FILE_PATH not specified. Exiting!}" || \ -z "${MONGODB_KEY_FILE_PATH:?MONGODB_KEY_FILE_PATH not specified. Exiting!}" || \
-z "${MONGODB_CA_FILE_PATH:?MONGODB_CA_FILE_PATH not specified. Exiting!}" || \ -z "${MONGODB_CA_FILE_PATH:?MONGODB_CA_FILE_PATH not specified. Exiting!}" || \
-z "${MONGODB_CRL_FILE_PATH:?MONGODB_CRL_FILE_PATH not specified. Exiting!}" || \ -z "${MONGODB_CRL_FILE_PATH:?MONGODB_CRL_FILE_PATH not specified. Exiting!}" ]] ; then
-z ${STORAGE_ENGINE_CACHE_SIZE:=''} ]] ; then echo "Missing required enviroment variable(s)."
#-z "${MONGODB_KEY_FILE_PASSWORD:?MongoDB Key File Password not specified. Exiting!}" || \
exit 1 exit 1
else else
echo REPLICA_SET_NAME="$REPLICA_SET_NAME" echo REPLICA_SET_NAME="$REPLICA_SET_NAME"