My openVPN connection start perfectly on boot with connman service for Internet and openVPN for my vpn connection.But, If I boot with a connection to Internet at boot and after many time I disconnect for a moment and reconnect after. Since I disconnect, the openVPN service will still run. And when I reconnect to Internet, I must manually systemctl restart openvpn@<configName>.service.So, I get a idea: set a dependency to internet to my openvpn service. But how ? My connman service will still run when I didn't have connection. So I can't use the Requires= on /usr/lib/systemd/system/openvpn\@.service (see wiki arch for more details)So is there a way to set a dependency to Internet to a service ? And auto stop/start the service when the Internet state change ?
How to add a dependency to internet to a service with systemd on arch?
arch linux;systemd;openvpn