1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 04:31:52 +00:00

softether: improve service dependencies

This commit is contained in:
Alexander Ried 2016-09-12 16:30:15 +02:00
parent 9819cdc71a
commit fbf0abf4af

View file

@ -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";