diff options
author | Emily <git@emilylange.de> | 2023-11-19 23:59:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-19 23:59:20 +0100 |
commit | 1f9a04da3ff917a1ece57ae702637690adab18a8 (patch) | |
tree | 3b39f38c7499f5e3def80c8ae95d66480d0cc361 /nixos/modules/services/web-servers | |
parent | cdc306ebe6c383346b0aa31b6d760fb7da447bda (diff) | |
parent | 79e7841ff70dff996d1e64edc7cf2b7f65171114 (diff) |
Merge pull request #265465 from jpds/caddy-restart-on-failure
nixos/caddy: Set systemd unit to restart on-failure
Diffstat (limited to 'nixos/modules/services/web-servers')
-rw-r--r-- | nixos/modules/services/web-servers/caddy/default.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/services/web-servers/caddy/default.nix b/nixos/modules/services/web-servers/caddy/default.nix index ce74e243a181..dcacb40e4681 100644 --- a/nixos/modules/services/web-servers/caddy/default.nix +++ b/nixos/modules/services/web-servers/caddy/default.nix @@ -376,7 +376,9 @@ in ReadWriteDirectories = cfg.dataDir; StateDirectory = mkIf (cfg.dataDir == "/var/lib/caddy") [ "caddy" ]; LogsDirectory = mkIf (cfg.logDir == "/var/log/caddy") [ "caddy" ]; - Restart = "on-abnormal"; + Restart = "on-failure"; + RestartPreventExitStatus = 1; + RestartSecs = "5s"; # TODO: attempt to upstream these options NoNewPrivileges = true; |