mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-05 17:56:46 +01:00
nixos/pleroma: regenerate empty release cookie files
Since b9cfbcafdf0ca9573de1cdc06137c020e70e44a8, the lack of hexdump in the closure lead to the generation of empty cookie files. This empty cookie file is making pleroma to crash at startup now we correctly read it. We introduce a migration forcing these empty cookies to be re-generated to something not empty.
This commit is contained in:
parent
e7f6370701
commit
b205832efe
|
@ -118,7 +118,7 @@ in {
|
|||
# Better be safe than sorry migration-wise.
|
||||
ExecStartPre =
|
||||
let preScript = pkgs.writers.writeBashBin "pleromaStartPre" ''
|
||||
if [ ! -f "${cookieFile}" ]
|
||||
if [ ! -f "${cookieFile}" ] || [ ! -s "${cookieFile}" ]
|
||||
then
|
||||
echo "Creating cookie file"
|
||||
dd if=/dev/urandom bs=1 count=16 | ${pkgs.hexdump}/bin/hexdump -e '16/1 "%02x"' > "${cookieFile}"
|
||||
|
|
Loading…
Reference in a new issue