mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 15:36:47 +03:00
nixos/caddy: Set systemd unit to restart on-failure whilst ignoring
error code 1. This is what's recommended by systemd for long-running services and helps with recovering from crashes.
This commit is contained in:
parent
18894fb2de
commit
79e7841ff7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user