✏️ More universal call to rtorrent

This commit is contained in:
z3rOR0ne 2025-03-18 01:30:29 -07:00
parent 190d6ee55a
commit 8099a49983

View file

@ -3,11 +3,11 @@
main() { main() {
if pgrep -x "openvpn" >/dev/null; then if pgrep -x "openvpn" >/dev/null; then
IPV4=$(ip addr show dev tun0 | grep inet | awk '{print $2}' | cut -d/ -f1 | head -n 1) IPV4=$(ip addr show dev tun0 | grep inet | awk '{print $2}' | cut -d/ -f1 | head -n 1)
/usr/bin/rtorrent -b "$IPV4" $(which rtorrent) -b "$IPV4"
else else
echo "openvpn is not running. please start your VPN first." echo "openvpn is not running. please start your VPN first."
exit 1 exit 1
fi fi
} }
main main