From 3ae53d7f32e136d0aba285a233616487fdbc9cff Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 10 Dec 2022 13:28:46 +0000 Subject: [PATCH] services: add `RestartSec` to anything which auto-restarts this is to prevent rapid restart failures from killing the service permanently. --- hosts/servo/services/goaccess.nix | 1 + hosts/servo/services/pleroma.nix | 1 + hosts/servo/services/trust-dns/default.nix | 1 + 3 files changed, 3 insertions(+) diff --git a/hosts/servo/services/goaccess.nix b/hosts/servo/services/goaccess.nix index f425eb291..7dd2bb8e3 100644 --- a/hosts/servo/services/goaccess.nix +++ b/hosts/servo/services/goaccess.nix @@ -25,6 +25,7 @@ ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; Type = "simple"; Restart = "on-failure"; + RestartSec = "10s"; # hardening WorkingDirectory = "/tmp"; diff --git a/hosts/servo/services/pleroma.nix b/hosts/servo/services/pleroma.nix index 56b6062a0..55e903cb4 100644 --- a/hosts/servo/services/pleroma.nix +++ b/hosts/servo/services/pleroma.nix @@ -127,6 +127,7 @@ systemd.services.pleroma.serviceConfig = { # postgres can be slow to service early requests, preventing pleroma from starting on the first try Restart = "on-failure"; + RestartSec = "10s"; }; # systemd.services.pleroma.serviceConfig = { diff --git a/hosts/servo/services/trust-dns/default.nix b/hosts/servo/services/trust-dns/default.nix index e37217f75..fb88e26db 100644 --- a/hosts/servo/services/trust-dns/default.nix +++ b/hosts/servo/services/trust-dns/default.nix @@ -13,6 +13,7 @@ ''; Type = "simple"; Restart = "on-failure"; + RestartSec = "10s"; # TODO: hardening }; after = [ "network.target" ];