Using rtorrent with dynamic vpn port
I use the rtorrent command line tool from time to time to download things distributed via torrents, and have found it annoying to update the config file when my exposed VPN port changes.
Here’s a quick bash function to dynamically set this when running rtorrent.
rt() { rtorrent -o network.port_range.set="$1-$1"; }
Usage:
$ rt 12345