summary refs log tree commit diff
path: root/nixos/modules/services/networking/softether.nix
diff options
context:
space:
mode:
authorAlexander Ried <ried@mytum.de>2016-09-12 16:30:15 +0200
committerAlexander Ried <ried@mytum.de>2016-09-13 11:19:22 +0200
commitfbf0abf4af3c5c5cc2366488f8867bf858cff741 (patch)
tree99d1af4171ecaad378e6f9f9f27182fbf04cb4cc /nixos/modules/services/networking/softether.nix
parent9819cdc71a796fa89825baf463f96cf51672de18 (diff)
downloadnixpkgs-fbf0abf4af3c5c5cc2366488f8867bf858cff741.tar
nixpkgs-fbf0abf4af3c5c5cc2366488f8867bf858cff741.tar.gz
nixpkgs-fbf0abf4af3c5c5cc2366488f8867bf858cff741.tar.bz2
nixpkgs-fbf0abf4af3c5c5cc2366488f8867bf858cff741.tar.lz
nixpkgs-fbf0abf4af3c5c5cc2366488f8867bf858cff741.tar.xz
nixpkgs-fbf0abf4af3c5c5cc2366488f8867bf858cff741.tar.zst
nixpkgs-fbf0abf4af3c5c5cc2366488f8867bf858cff741.zip
softether: improve service dependencies
Diffstat (limited to 'nixos/modules/services/networking/softether.nix')
-rw-r--r--nixos/modules/services/networking/softether.nix16
1 files changed, 9 insertions, 7 deletions
diff --git a/nixos/modules/services/networking/softether.nix b/nixos/modules/services/networking/softether.nix
index 5e49efc3aa3..16530078b97 100644
--- a/nixos/modules/services/networking/softether.nix
+++ b/nixos/modules/services/networking/softether.nix
@@ -63,7 +63,6 @@ in
         ];
       systemd.services."softether-init" = {
         description = "SoftEther VPN services initial task";
-        wantedBy = [ "network-interfaces.target" ];
         serviceConfig = {
           Type = "oneshot";
           RemainAfterExit = false;
@@ -84,8 +83,9 @@ in
     (mkIf (cfg.vpnserver.enable) {
       systemd.services.vpnserver = {
         description = "SoftEther VPN Server";
-        after = [ "softether-init.service" ];
-        wantedBy = [ "network-interfaces.target" ];
+        after = [ "softether-init.service" "network.target" ];
+        wants = [ "softether-init.service" ];
+        wantedBy = [ "multi-user.target" ];
         serviceConfig = {
           Type = "forking";
           ExecStart = "${pkg}/bin/vpnserver start";
@@ -104,8 +104,9 @@ in
     (mkIf (cfg.vpnbridge.enable) {
       systemd.services.vpnbridge = {
         description = "SoftEther VPN Bridge";
-        after = [ "softether-init.service" ];
-        wantedBy = [ "network-interfaces.target" ];
+        after = [ "softether-init.service" "network.target" ];
+        wants = [ "softether-init.service" ];
+        wantedBy = [ "multi-user.target" ];
         serviceConfig = {
           Type = "forking";
           ExecStart = "${pkg}/bin/vpnbridge start";
@@ -124,8 +125,9 @@ in
     (mkIf (cfg.vpnclient.enable) {
       systemd.services.vpnclient = {
         description = "SoftEther VPN Client";
-        after = [ "softether-init.service" ];
-        wantedBy = [ "network-interfaces.target" ];
+        after = [ "softether-init.service" "network.target" ];
+        wants = [ "softether-init.service" ];
+        wantedBy = [ "multi-user.target" ];
         serviceConfig = {
           Type = "forking";
           ExecStart = "${pkg}/bin/vpnclient start";