mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
wireguard: restart on failure
As a oneshot service, if the startup failed it would never be attempted again. This is problematic when peer's addresses require DNS. DNS may not be reliably available at the time wireguard starts. Converting this to a simple service with Restart and RestartAfter directives allows the service to be reattempted, but at the cost of losing the oneshot semantics. Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>
This commit is contained in:
parent
f38707a4e4
commit
1bff53cb84
@ -245,7 +245,9 @@ let
|
||||
path = with pkgs; [ kmod iproute wireguard-tools ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
Type = "simple";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "5s";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user