From 8ac73c3c59e4a747a75b52aafb0290f4d45f6e81 Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Wed, 16 Sep 2015 10:59:14 -0400 Subject: [PATCH] fix check for postgres password --- 9.0/docker-entrypoint.sh | 2 +- 9.1/docker-entrypoint.sh | 2 +- 9.2/docker-entrypoint.sh | 2 +- 9.3/docker-entrypoint.sh | 2 +- 9.4/docker-entrypoint.sh | 2 +- 9.5/docker-entrypoint.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/9.0/docker-entrypoint.sh b/9.0/docker-entrypoint.sh index 87d7e3b87c..2ae806fe2f 100755 --- a/9.0/docker-entrypoint.sh +++ b/9.0/docker-entrypoint.sh @@ -19,7 +19,7 @@ if [ "$1" = 'postgres' ]; then # check password first so we can output the warning before postgres # messes it up - if [ "$POSTGRES_PASSWORD" ]; then + if [ -n "$POSTGRES_PASSWORD" ]; then pass="PASSWORD '$POSTGRES_PASSWORD'" authMethod=md5 else diff --git a/9.1/docker-entrypoint.sh b/9.1/docker-entrypoint.sh index 87d7e3b87c..2ae806fe2f 100755 --- a/9.1/docker-entrypoint.sh +++ b/9.1/docker-entrypoint.sh @@ -19,7 +19,7 @@ if [ "$1" = 'postgres' ]; then # check password first so we can output the warning before postgres # messes it up - if [ "$POSTGRES_PASSWORD" ]; then + if [ -n "$POSTGRES_PASSWORD" ]; then pass="PASSWORD '$POSTGRES_PASSWORD'" authMethod=md5 else diff --git a/9.2/docker-entrypoint.sh b/9.2/docker-entrypoint.sh index 87d7e3b87c..2ae806fe2f 100755 --- a/9.2/docker-entrypoint.sh +++ b/9.2/docker-entrypoint.sh @@ -19,7 +19,7 @@ if [ "$1" = 'postgres' ]; then # check password first so we can output the warning before postgres # messes it up - if [ "$POSTGRES_PASSWORD" ]; then + if [ -n "$POSTGRES_PASSWORD" ]; then pass="PASSWORD '$POSTGRES_PASSWORD'" authMethod=md5 else diff --git a/9.3/docker-entrypoint.sh b/9.3/docker-entrypoint.sh index 87d7e3b87c..2ae806fe2f 100755 --- a/9.3/docker-entrypoint.sh +++ b/9.3/docker-entrypoint.sh @@ -19,7 +19,7 @@ if [ "$1" = 'postgres' ]; then # check password first so we can output the warning before postgres # messes it up - if [ "$POSTGRES_PASSWORD" ]; then + if [ -n "$POSTGRES_PASSWORD" ]; then pass="PASSWORD '$POSTGRES_PASSWORD'" authMethod=md5 else diff --git a/9.4/docker-entrypoint.sh b/9.4/docker-entrypoint.sh index 87d7e3b87c..2ae806fe2f 100755 --- a/9.4/docker-entrypoint.sh +++ b/9.4/docker-entrypoint.sh @@ -19,7 +19,7 @@ if [ "$1" = 'postgres' ]; then # check password first so we can output the warning before postgres # messes it up - if [ "$POSTGRES_PASSWORD" ]; then + if [ -n "$POSTGRES_PASSWORD" ]; then pass="PASSWORD '$POSTGRES_PASSWORD'" authMethod=md5 else diff --git a/9.5/docker-entrypoint.sh b/9.5/docker-entrypoint.sh index 87d7e3b87c..2ae806fe2f 100755 --- a/9.5/docker-entrypoint.sh +++ b/9.5/docker-entrypoint.sh @@ -19,7 +19,7 @@ if [ "$1" = 'postgres' ]; then # check password first so we can output the warning before postgres # messes it up - if [ "$POSTGRES_PASSWORD" ]; then + if [ -n "$POSTGRES_PASSWORD" ]; then pass="PASSWORD '$POSTGRES_PASSWORD'" authMethod=md5 else