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