🔧 Updated rtorrent script
This commit is contained in:
parent
8ac09dab45
commit
06942af2c5
2 changed files with 8 additions and 1 deletions
8
scripts/rt
Executable file
8
scripts/rt
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if pgrep -x "openvpn" >/dev/null; then
|
||||
IPV4=$(ip addr show dev tun0 | grep inet | awk '{print $2}' | cut -d/ -f1 | head -n 1)
|
||||
/usr/bin/rtorrent -b "$IPV4"
|
||||
else
|
||||
echo "openvpn is not running. please start your VPN first."
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue