diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-22 13:08:00 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-22 13:14:58 +0200 |
commit | 27a8cada791d3de1fd1c6992221ab485d9e4a349 (patch) | |
tree | 29e6065c72436b1ad6e9de6474e563ec183dc551 /nixos | |
parent | 33b4ab3ac1d2861ea23a82c20ccfbd7a2bb04df3 (diff) | |
download | nixlib-27a8cada791d3de1fd1c6992221ab485d9e4a349.tar nixlib-27a8cada791d3de1fd1c6992221ab485d9e4a349.tar.gz nixlib-27a8cada791d3de1fd1c6992221ab485d9e4a349.tar.bz2 nixlib-27a8cada791d3de1fd1c6992221ab485d9e4a349.tar.lz nixlib-27a8cada791d3de1fd1c6992221ab485d9e4a349.tar.xz nixlib-27a8cada791d3de1fd1c6992221ab485d9e4a349.tar.zst nixlib-27a8cada791d3de1fd1c6992221ab485d9e4a349.zip |
openvpn: Add systemd startup notification
This causes OpenVPN services to reach the "active" state when the VPN connection is up (i.e., after OpenVPN prints "Initialization Sequence Completed"). This allows units to be ordered correctly after openvpn-* units, and makes systemctl present a password prompt: $ start openvpn-foo Enter Private Key Password: ************* (I first tried to implement this by calling "systemd-notify --ready" from the "up" script, but systemd-notify is not reliable.)
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/networking/openvpn.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/openvpn.nix b/nixos/modules/services/networking/openvpn.nix index e3998b1e5b28..9dc88e61865d 100644 --- a/nixos/modules/services/networking/openvpn.nix +++ b/nixos/modules/services/networking/openvpn.nix @@ -56,6 +56,7 @@ let serviceConfig.ExecStart = "@${openvpn}/sbin/openvpn openvpn --config ${configFile}"; serviceConfig.Restart = "always"; + serviceConfig.Type = "notify"; }; in |