From 8ce6d4a4df0b16f0f68d582b2b50beddce3ab46a Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Wed, 17 Apr 2024 14:55:10 +0200 Subject: [PATCH] couchdb magic cookie --- scripts/install | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index b76efed..07de56d 100755 --- a/scripts/install +++ b/scripts/install @@ -16,13 +16,17 @@ ynh_app_setting_set --app=$app --key=password_couchdb_admin --value="$password_c # skip the installation steps below ynh_script_progression --message="Installing CouchDB..." --weight=60 -# @@ todo: why is 'cookie string' and 'admin password' below the same? +# A CouchDB node has an Erlang magic cookie value set at startup. +# This value must match for all nodes in the cluster. If they do not match, +# attempts to connect the node to the cluster will be rejected. +couchdb_magic_cookie=$(openssl rand 256 | base64 -w 0) + echo "\ couchdb couchdb/mode select standalone couchdb couchdb/mode seen true couchdb couchdb/bindaddress string 127.0.0.1 couchdb couchdb/bindaddress seen true -couchdb couchdb/cookie string $password_couchdb_admin +couchdb couchdb/cookie string $couchdb_magic_cookie couchdb couchdb/adminpass password $password_couchdb_admin couchdb couchdb/adminpass seen true couchdb couchdb/adminpass_again password $password_couchdb_admin