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:
Yorick 2018-09-02 17:07:55 +02:00 committed by xeji
parent 7b54a50e97
commit 1ee3ad6732

View File

@ -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}
'';