Emitter: Try restarting burp-client a few times

This commit is contained in:
fruchti 2023-04-07 14:00:05 +02:00
parent 050a28f91f
commit b9775500fb

View file

@ -117,7 +117,20 @@
};
};
services.statusEmail.enable = true;
systemd.services.burp-client.unitConfig.OnFailure = "status-email@%n.service";
systemd.services.burp-client = let
retryDelay = 10 * 60;
maxRetries = 3;
in {
unitConfig = {
OnFailure = "status-email@%n.service";
StartLimitIntervalSec = (maxRetries + 1) * retryDelay;
StartLimitBurst = maxRetries;
};
serviceConfig = {
Restart = "on-failure";
RestartSec = retryDelay;
};
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions