On 05/06/2017 10:09 PM, Gaiko Kyofusho wrote:
> Thx, I created it uisng the Qubes Doc instructions. So perhaps I could
> combine the two lines you wrote to make it a bit shorter?
>
> alias rstopvn="sudo pkill openvpn && sudo /rw/config/rc.local"
>
> maybe?
In this case using a ';' semicolon between the commands instead of '&&'
makes sense, because openvpn may not be already running.
BTW, another thing you could do instead is to add an infinite loop to
the end of rc.local:
while true; do
sg qvpn -c "$VPN_CLIENT $VPN_OPTIONS"
done
Yet another thing you can try (because I'm recalling my early
experiences with openvpn) is to comment-out the "persist tun" line in
your ovpn file. Openvpn can experience problems trying to re-use tun
devices, and that can cause it to quit when trying to re-connect. This
is the simplest remedy.