You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2022/04/27 20:47:01 UTC

[couchdb-pkg] 06/06: Fix cookie preseeding

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-pkg.git

commit f493f2753dfdeda28e2af99cd85be15026b37fa7
Author: Robert Newson <rn...@apache.org>
AuthorDate: Wed Apr 20 20:43:29 2022 +0100

    Fix cookie preseeding
---
 debian/couchdb.config | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/debian/couchdb.config b/debian/couchdb.config
index df9518c..e21d9e7 100755
--- a/debian/couchdb.config
+++ b/debian/couchdb.config
@@ -84,7 +84,9 @@ promptcookie() {
 if [ -e /opt/couchdb/etc/vm.args ] ; then
   cookie="$(grep '^-setcookie' /opt/couchdb/etc/vm.args | cut -d ' ' -f 2 | stripwhitespace)"
   nodename="$(grep '^-name' /opt/couchdb/etc/vm.args | cut -d ' ' -f 2 | stripwhitespace)"
-  db_set couchdb/cookie "${cookie}"
+  if [ -n "$cookie" ]; then
+      db_set couchdb/cookie "${cookie}"
+  fi
   if [ "${nodename}" != "couchdb@127.0.0.1" ]; then
     db_set couchdb/nodename "${nodename}"
   fi