lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

OpenVPN: don't fail to restart stopped units (#345993)

authored by

Sandro and committed by
GitHub
a633b5fb 61d50acf

+3 -2
+3 -2
nixos/modules/services/networking/openvpn.nix
··· 73 73 openvpn-restart = { 74 74 wantedBy = [ "sleep.target" ]; 75 75 path = [ pkgs.procps ]; 76 - script = "pkill --signal SIGHUP --exact openvpn"; 77 - #SIGHUP makes openvpn process to self-exit and then it got restarted by systemd because of Restart=always 76 + script = let 77 + unitNames = map (n: "openvpn-${n}.service") (builtins.attrNames cfg.servers); 78 + in "systemctl try-restart ${lib.escapeShellArgs unitNames}"; 78 79 description = "Sends a signal to OpenVPN process to trigger a restart after return from sleep"; 79 80 }; 80 81 };