✏️ More universal call to rtorrent
This commit is contained in:
parent
190d6ee55a
commit
8099a49983
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue