Quantcast
Channel: Active questions tagged openvpn - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 834

OpenVPN status and systemd

$
0
0

I got a simple systemd service to ensure im connected to a VPN, before another systemd service proceeds to start (the other systemd service, Requires this one). The VPN service looks roughly as follows

[Unit]Description=Establish connection to VPN[Service]ExecStart=/usr/bin/openvpn --config /etc/openvpn/ipvanish/ipvanish-UK-London-lon-a42.ovpn --ca /etc/openvpn/ipvanish/ca.ipvanish.com.crt --auth-user-pass /pathtopwd/fileExecStartPost=sleep 2

Now, the last line is annoying me a little bit. Basically, I placed in it there, to ensure that the VPN is up and running before other systemd jobs which Requires this service proceeds to start.

It works, but it feels rather inelegant. Could anybody suggest a cleaner way to ensure that the VPN is actually up and running, before other systemd services, which depends on this service will start up?


Viewing all articles
Browse latest Browse all 834

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>