0
2
mirror of https://github.com/dali99/nixos-matrix-modules.git synced 2026-07-08 06:55:22 +02:00

{synapse,workers}: restart synapse processes on unexpected exit

This commit is contained in:
2026-01-14 02:48:55 +09:00
parent a0a6983589
commit 5b9febcd84
2 changed files with 10 additions and 1 deletions
+5
View File
@@ -395,9 +395,14 @@ in {
User = "matrix-synapse";
Group = "matrix-synapse";
Slice = "system-matrix-synapse.slice";
Restart = "always";
RestartSec = 3;
WorkingDirectory = cfg.dataDir;
RuntimeDirectory = "matrix-synapse";
StateDirectory = "matrix-synapse";
ExecStartPre = pkgs.writers.writeBash "wait-for-synapse" ''
# From https://md.darmstadt.ccc.de/synapse-at-work
while ! systemctl is-active -q matrix-synapse.service; do