Hi,

On 02/02/22 15:47, Antonio Quartulli wrote:
Hi,

On 02/02/2022 14:02, Emanuel Gonzalez wrote:
Hi everyone

I’m trying to start a VPN connection through a shell script but I can’t run it in background, I’ve tried with:

sudo openvpn --config "/home/user/config.ovpn" &
sudo openvpn --config "/home/user/config.ovpn" >/dev/null 2>&1

tried adding --daemon ?

However, the best way is to rely on your system to launch a daemon (i.e. via systemd or openrc)


if you insist on running things as a "mere mortal" you could also use the NetworkManager to stop and start OpenVPN connections. This can be done using the 'nmcli' as well using

  nmcli con up  <name of NetworkManager entry>

you can import an OpenVPN config into the NetworkManager using

  nmcli con import type openvpn file  bla.opvn

HTH,

JJK





_______________________________________________
Openvpn-users mailing list
Openvpn-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-users

Reply via email to