We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc514e5 commit 35fb978Copy full SHA for 35fb978
1 file changed
couchdb/docker-entrypoint.sh
@@ -90,12 +90,12 @@ if [ "$1" = '/opt/couchdb/bin/couchdb' ]; then
90
}
91
' "$CLUSTER_CREDENTIALS")
92
93
- if [ "$admin_status" = "has_admins" ]; then
+ if [[ "$admin_status" == "has_admins" ]]; then
94
awk -v user="$COUCHDB_USER" -v pass="$COUCHDB_PASSWORD" '
95
{ print $0 }
96
/^\[admins\]$/ { print user " = " pass }
97
' "$CLUSTER_CREDENTIALS" > "$CLUSTER_CREDENTIALS.tmp" && cat "$CLUSTER_CREDENTIALS.tmp" > "$CLUSTER_CREDENTIALS" && rm "$CLUSTER_CREDENTIALS.tmp"
98
- elif [ "$admin_status" = "missing" ]; then
+ elif [[ "$admin_status" == "missing" ]]; then
99
printf "\n[admins]\n%s = %s\n" "$COUCHDB_USER" "$COUCHDB_PASSWORD" >>"$CLUSTER_CREDENTIALS"
100
fi
101
0 commit comments