mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-26 23:27:29 +03:00
nixos/ejabberd: ensure erlang cookie is made
Apply the same fix as found in `couchdb` and `rabbitmq`.
This commit is contained in:
parent
582ac2a6a9
commit
2ca79e7f9d
@ -125,6 +125,12 @@ in {
|
|||||||
if [ -z "$(ls -A '${cfg.spoolDir}')" ]; then
|
if [ -z "$(ls -A '${cfg.spoolDir}')" ]; then
|
||||||
touch "${cfg.spoolDir}/.firstRun"
|
touch "${cfg.spoolDir}/.firstRun"
|
||||||
fi
|
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 = ''
|
postStart = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user