wireguard: change preStop to postStop, require network.target (#45569)
* wireguard: change preStop to postStop, require network.target * wireguard service: network.target -> network-online.target
This commit is contained in:
parent
7b54a50e97
commit
1ee3ad6732
@ -190,7 +190,8 @@ let
|
||||
nameValuePair "wireguard-${name}"
|
||||
{
|
||||
description = "WireGuard Tunnel - ${name}";
|
||||
after = [ "network.target" ];
|
||||
requires = [ "network-online.target" ];
|
||||
after = [ "network.target" "network-online.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment.DEVICE = name;
|
||||
path = with pkgs; [ kmod iproute wireguard-tools ];
|
||||
@ -236,7 +237,7 @@ let
|
||||
${values.postSetup}
|
||||
'';
|
||||
|
||||
preStop = ''
|
||||
postStop = ''
|
||||
ip link del dev ${name}
|
||||
${values.postShutdown}
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user