fuuko/hedgedoc: Start after postgresql

This commit is contained in:
Simon Bruder 2021-03-30 16:13:20 +02:00
parent a32b45ebb7
commit 2d74dac8c0
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -34,6 +34,7 @@ in
};
systemd.services.hedgedoc = {
after = [ "postgresql.service" ];
preStart = toString (pkgs.writeShellScript "hedgedoc-generate-session-secret" ''
if [ ! -f ${cfg.workDir}/session_secret_env ]; then
echo "CMD_SESSION_SECRET=$(${pkgs.pwgen}/bin/pwgen -s 32 1)" > ${cfg.workDir}/session_secret_env