couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woh...@apache.org
Subject [couchdb-docker] branch master updated: add end of line before inserting [admin] and [secret] in case of docker.ini already exists
Date Thu, 12 Jul 2018 17:40:31 GMT
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-docker.git


The following commit(s) were added to refs/heads/master by this push:
     new 0b03521  add end of line before inserting [admin] and [secret] in case of docker.ini
already exists
0b03521 is described below

commit 0b03521edeea030bd07244264f60980bebd45b48
Author: Thomas Prevet <thomas.prevet@gmail.com>
AuthorDate: Thu Jul 12 16:11:35 2018 +0200

    add end of line before inserting [admin] and [secret] in case of docker.ini already exists
---
 2.1.2/docker-entrypoint.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/2.1.2/docker-entrypoint.sh b/2.1.2/docker-entrypoint.sh
index c60c957..4ba69b4 100755
--- a/2.1.2/docker-entrypoint.sh
+++ b/2.1.2/docker-entrypoint.sh
@@ -43,14 +43,14 @@ if [ "$1" = '/opt/couchdb/bin/couchdb' ]; then
 	if [ "$COUCHDB_USER" ] && [ "$COUCHDB_PASSWORD" ]; then
 		# Create admin only if not already present
 		if ! grep -Pzoqr "\[admins\]\n$COUCHDB_USER =" /opt/couchdb/etc/local.d/*.ini; then
-			printf "[admins]\n%s = %s\n" "$COUCHDB_USER" "$COUCHDB_PASSWORD" >> /opt/couchdb/etc/local.d/docker.ini
+			printf "\n[admins]\n%s = %s\n" "$COUCHDB_USER" "$COUCHDB_PASSWORD" >> /opt/couchdb/etc/local.d/docker.ini
 		fi
 	fi
 
 	if [ "$COUCHDB_SECRET" ]; then
 		# Set secret only if not already present
 		if ! grep -Pzoqr "\[couch_httpd_auth\]\nsecret =" /opt/couchdb/etc/local.d/*.ini; then
-			printf "[couch_httpd_auth]\nsecret = %s\n" "$COUCHDB_SECRET" >> /opt/couchdb/etc/local.d/docker.ini
+			printf "\n[couch_httpd_auth]\nsecret = %s\n" "$COUCHDB_SECRET" >> /opt/couchdb/etc/local.d/docker.ini
 		fi
 	fi
 


Mime
View raw message