nixos/ejabberd: ensure erlang cookie is made

Apply the same fix as found in `couchdb` and `rabbitmq`.
This commit is contained in:
Peder Bergebakken Sundt 2023-11-25 15:41:13 +01:00
parent 582ac2a6a9
commit 2ca79e7f9d

View File

@ -125,6 +125,12 @@ in {
if [ -z "$(ls -A '${cfg.spoolDir}')" ]; then
touch "${cfg.spoolDir}/.firstRun"
fi
if ! test -e ${cfg.spoolDir}/.erlang.cookie; then
touch ${cfg.spoolDir}/.erlang.cookie
chmod 600 ${cfg.spoolDir}/.erlang.cookie
dd if=/dev/random bs=16 count=1 | base64 > ${cfg.spoolDir}/.erlang.cookie
fi
'';
postStart = ''