I am currently running both Transmission-daemon and OpenVPN. Unfortunately OpenVPN connection drops. Is there any way that I can make Transmission-daemon dependent on OpenVPN running, so that if OpenVPN does drop, Transmission-daemon will automatically stop?
If the openvpn service crashes (which in my experience rarely happens), then you can modify systemd to restart it automatically. See here for details.
Otherwise, you need to do something yourself, either using iptables or perhaps a shell script to modify transmission’s settings.json parameter bind-address-ipv4 to the tunnel’s IP address. Alternatively, a shell script to detect that the tunnel is down and then stop transmission.
Sorry, I wasn’t sure how best to describe it. Yes, the openvpn service crashes.
I saw that post actually. However I don’t want openvpn to run continuously, as I want to run Netflix too.
On a slightly different note, sometimes when I start or stop the openvpn service and use “curl ipinfo.io/ip” to check whether the openvpn service is running properly or not, I get the following error message “curl: (6) Could not resolve host: ipinfo.io”. What does this mean, and is there any way to go about correcting it, to either show the VPN’s IP address or my true IP address?
It will only restart if you started it in the first place. If you stop it, it remains stopped.
It looks like a DNS issue. File /etc/resolv.conf should contain the IP address of your DNS resolver. A few recent posters seem to have had DNS problems with openvpn for reasons that are not totally clear, though might be because the VPN servers have been blacklisted by the DNS resolver. If you installed resolvconf, I’d recommend that you remove it and use openresolv instead.
File /etc/resolv.conf can contain up to three DNS resolvers. You might have set them yourself in OSMC, in which case you’d probably recognise them; they might have come from the router, which you might (or might not) have configured some time previously; or they might have come from the VPN server when you connect to it.