services: add RestartSec to anything which auto-restarts

this is to prevent rapid restart failures from killing the service
permanently.
This commit is contained in:
2022-12-10 13:28:46 +00:00
parent e7f2d41b1f
commit 3ae53d7f32
3 changed files with 3 additions and 0 deletions

View File

@@ -25,6 +25,7 @@
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
Type = "simple"; Type = "simple";
Restart = "on-failure"; Restart = "on-failure";
RestartSec = "10s";
# hardening # hardening
WorkingDirectory = "/tmp"; WorkingDirectory = "/tmp";

View File

@@ -127,6 +127,7 @@
systemd.services.pleroma.serviceConfig = { systemd.services.pleroma.serviceConfig = {
# postgres can be slow to service early requests, preventing pleroma from starting on the first try # postgres can be slow to service early requests, preventing pleroma from starting on the first try
Restart = "on-failure"; Restart = "on-failure";
RestartSec = "10s";
}; };
# systemd.services.pleroma.serviceConfig = { # systemd.services.pleroma.serviceConfig = {

View File

@@ -13,6 +13,7 @@
''; '';
Type = "simple"; Type = "simple";
Restart = "on-failure"; Restart = "on-failure";
RestartSec = "10s";
# TODO: hardening # TODO: hardening
}; };
after = [ "network.target" ]; after = [ "network.target" ];