diff --git a/README.md b/README.md index 93cb1f3..101be75 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ Override settings in `.rtorrent.rc`: - **MAX_UPLOADS** overrides `max_uploads`. - **DOWNLOAD_RATE** overrides `download_rate`. - **UPLOAD_RATE** overrides `upload_rate`. + - **PORT_RANGE** overrides `port_range` (*6801-6810*). ## Requirement diff --git a/rootfs/usr/local/bin/docktorrent b/rootfs/usr/local/bin/docktorrent index f17dcb9..d8ff672 100755 --- a/rootfs/usr/local/bin/docktorrent +++ b/rootfs/usr/local/bin/docktorrent @@ -31,6 +31,10 @@ chown -R www-data:www-data /rtorrent sed -i '/^upload_rate =/d' /root/.rtorrent.rc echo "upload_rate = ${UPLOAD_RATE}" >> /root/.rtorrent.rc } +[ "${PORT_RANGE}" ] && { + sed -i '/^port_range =/d' /root/.rtorrent.rc + echo "port_range = ${PORT_RANGE}" >> /root/.rtorrent.rc +} # Turn off all logs [ "${LOGS_OFF}" == "yes" ] || [ "${LOGS_OFF}" == "y" ] && {