Use env variables names for error messages

- Address comments
This commit is contained in:
Muawia Khan 2017-08-17 10:46:19 +02:00
parent d11c100ab5
commit 7658097221
5 changed files with 36 additions and 36 deletions

View File

@ -9,10 +9,10 @@ mms_groupid_keyfile_path=`printenv MMS_GROUPID_KEYFILE_PATH`
ca_crt_path=`printenv CA_CRT_PATH`
backup_pem_path=`printenv BACKUP_PEM_PATH`
if [[ -z "${mms_api_keyfile_path:?MMS API Keyfile path not specified. Exiting!}" || \
-z "${ca_crt_path:?CA CRT path not specified. Exiting!}" || \
-z "${backup_pem_path:?Backup PEM path not specified. Exiting!}" || \
-z "${mms_groupid_keyfile_path:?MMS GroupID keyfile path not specified. Exiting!}" ]]; then
if [[ -z "${mms_api_keyfile_path:?MMS_API_KEYFILE_PATH not specified. Exiting!}" || \
-z "${ca_crt_path:?CA_CRT_PATH not specified. Exiting!}" || \
-z "${backup_pem_path:?BACKUP_PEM_PATH not specified. Exiting!}" || \
-z "${mms_groupid_keyfile_path:?MMS_GROUPID_KEYFILE_PATH not specified. Exiting!}" ]]; then
exit 1
else
echo MMS_API_KEYFILE_PATH="$mms_api_key"

View File

@ -13,10 +13,10 @@ mms_groupid_keyfile_path=`printenv MMS_GROUPID_KEYFILE_PATH`
ca_crt_path=`printenv CA_CRT_PATH`
monitoring_pem_path=`printenv MONITORING_PEM_PATH`
if [[ -z "${mms_api_keyfile_path:?MMS API keyfile path not specified. Exiting!}" || \
-z "${ca_crt_path:?CA CRT path not specified. Exiting!}" || \
-z "${monitoring_pem_path:?Monitoring PEM path not specified. Exiting!}" || \
-z "${mms_groupid_keyfile_path:?MMS GroupID keyfile path not specified. Exiting!}" ]];then
if [[ -z "${mms_api_keyfile_path:?MMS_API_KEYFILE_PATH not specified. Exiting!}" || \
-z "${ca_crt_path:?CA_CRT_PATH not specified. Exiting!}" || \
-z "${monitoring_pem_path:?MONITORING_PEM_PATH not specified. Exiting!}" || \
-z "${mms_groupid_keyfile_path:?MMS_GROUPID_KEYFILE_PATH not specified. Exiting!}" ]];then
exit 1
else
echo MMS_API_KEYFILE_PATH="$mms_api_keyfile_path"

View File

@ -55,13 +55,13 @@ while [[ $# -gt 1 ]]; do
done
# sanity checks
if [[ -z "${REPLICA_SET_NAME:?MongoDB Replica Set name not specified. Exiting!}" || \
-z "${MONGODB_PORT:?MongoDB Port not specified. Exiting!}" || \
-z "${MONGODB_FQDN:?MongoDB FQDN 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_CA_FILE_PATH:?MongoDB CA File path not specified. Exiting!}" || \
-z "${MONGODB_CRL_FILE_PATH:?MongoDB CRL File path not specified. Exiting!}" ]] ; then
if [[ -z "${REPLICA_SET_NAME:?REPLICA_SET_NAME not specified. Exiting!}" || \
-z "${MONGODB_PORT:?MONGODB_PORT not specified. Exiting!}" || \
-z "${MONGODB_FQDN:?MONGODB_FQDN 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_CA_FILE_PATH:?MONGODB_CA_FILE_PATH not specified. Exiting!}" || \
-z "${MONGODB_CRL_FILE_PATH:?MONGODB_CRL_FILE_PATH not specified. Exiting!}" ]] ; then
#-z "${MONGODB_KEY_FILE_PASSWORD:?MongoDB Key File Password not specified. Exiting!}" || \
exit 1
else

View File

@ -23,15 +23,15 @@ bdb_ws_port=`printenv BIGCHAINDB_WS_PORT`
# sanity check
if [[ -z "${cluster_frontend_port:?Cluster frontend port not specified. Exiting!}" || \
-z "${mongo_frontend_port:?MongoDB frontend port not specified. Exiting!}" || \
-z "${mongo_backend_host:?MongoDB backend host not specified. Exiting!}" || \
-z "${mongo_backend_port:?MongoDB backend port not specified. Exiting!}" || \
-z "${bdb_backend_host:?BigchainDB backend host not specified. Exiting!}" || \
-z "${bdb_api_port:?BigchainDB API port not specified. Exiting!}" || \
-z "${bdb_ws_port:?BigchainDB WS port not specified. Exiting!}" || \
-z "${dns_server:?DNS server not specified. Exiting!}" || \
-z "${health_check_port:?}" ]]; then
if [[ -z "${cluster_frontend_port:?CLUSTER_FRONTEND_PORT not specified. Exiting!}" || \
-z "${mongo_frontend_port:?MONGODB_FRONTEND_PORT not specified. Exiting!}" || \
-z "${mongo_backend_host:?MONGODB_BACKEND_HOST not specified. Exiting!}" || \
-z "${mongo_backend_port:?MONGODB_BACKEND_PORT not specified. Exiting!}" || \
-z "${bdb_backend_host:?BIGCHAINDB_BACKEND_HOST not specified. Exiting!}" || \
-z "${bdb_api_port:?BIGCHAINDB_API_PORT not specified. Exiting!}" || \
-z "${bdb_ws_port:?BIGCHAINDB_WS_PORT not specified. Exiting!}" || \
-z "${dns_server:?DNS_SERVER not specified. Exiting!}" || \
-z "${health_check_port:?HEALTH_CHECK_PORT not specified.}" ]]; then
exit 1
else
echo CLUSTER_FRONTEND_PORT="$cluster_frontend_port"

View File

@ -29,18 +29,18 @@ bdb_ws_port=`printenv BIGCHAINDB_WS_PORT`
# sanity check
if [[ -z "${cluster_frontend_port:?Cluster frontend port not specified. Exiting!}" || \
-z "${mongo_frontend_port:?MongoDB frontend port not specified. Exiting!}" || \
-z "${mongo_backend_host:?MongoDB backend host not specified. Exiting!}" || \
-z "${mongo_backend_port:?MongoDB backend port not specified. Exiting!}" || \
-z "${openresty_backend_port:?OpenResty backend port not specified. Exiting!}" || \
-z "${openresty_backend_host:?OpenResty backend host not specified. Exiting!}" || \
-z "${bdb_backend_host:?BigchainDB backend host not specified. Exiting!}" || \
-z "${bdb_api_port:?BigchainDB API port not specified. Exiting!}" || \
-z "${bdb_ws_port:?BigchainDB WS port not specified. Exiting!}" || \
-z "${dns_server:?DNS server not specified. Exiting!}" || \
-z "${health_check_port:?Health check port not specified. Exiting!}" || \
-z "${cluster_fqdn:?Cluster FQDN not specified. Exiting!}" ]]; then
if [[ -z "${cluster_frontend_port:?CLUSTER_FRONTEND_PORT not specified. Exiting!}" || \
-z "${mongo_frontend_port:?MONGODB_FRONTEND_PORT not specified. Exiting!}" || \
-z "${mongo_backend_host:?MONGODB_BACKEND_HOST not specified. Exiting!}" || \
-z "${mongo_backend_port:?MONGODB_BACKEND_PORT not specified. Exiting!}" || \
-z "${openresty_backend_port:?OPENRESTY_BACKEND_PORT not specified. Exiting!}" || \
-z "${openresty_backend_host:?OPENRESTY_BACKEND_HOST not specified. Exiting!}" || \
-z "${bdb_backend_host:?BIGCHAINDB_BACKEND_HOST not specified. Exiting!}" || \
-z "${bdb_api_port:?BIGCHAINDB_API_PORT not specified. Exiting!}" || \
-z "${bdb_ws_port:?BIGCHAINDB_WS_PORT not specified. Exiting!}" || \
-z "${dns_server:?DNS_SERVER not specified. Exiting!}" || \
-z "${health_check_port:?HEALTH_CHECK_PORT not specified. Exiting!}" || \
-z "${cluster_fqdn:?CLUSTER_FQDN not specified. Exiting!}" ]]; then
exit 1
else
echo CLUSTER_FQDN="$cluster_fqdn"