Skip to content
Snippets Groups Projects
Verified Commit a3bcd59c authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

feat: allow specifying external ip easily

parent e88d2fbc
No related branches found
No related tags found
No related merge requests found
Pipeline #2889 passed
......@@ -72,6 +72,10 @@ ENV RT_MAX_PEERS_SEED=80
ENV RT_TRACKERS_WANT=80
ENV RT_MEMORY_MAX="1800M"
ENV RT_LOGLEVEL="info"
# Set to automatically run this command on startup to set the external address
ENV EXTERNAL_IP_CMD=""
# Set to automatically set the external address
ENV EXTERNAL_IP=""
VOLUME ["/data"]
VOLUME ["/tmp"]
......
......@@ -5,8 +5,13 @@ mkdir -p /tmp/.session
echo > /tmp/rtorrent.log
rm /tmp/.session/rtorrent.lock /tmp/.session/rtorrent.pid || true
# Start rtorrent as a daemon with the setting in the config file
# & to actually run it in the background
rtorrent -n -o "import=/rtorrent.rc" &
if [ -n "$EXTERNAL_IP_CMD" ]; then
EXTERNAL_IP=$(eval "$EXTERNAL_IP_CMD")
fi
if [ -n "$EXTERNAL_IP" ]; then
rtorrent -i "$EXTERNAL_IP" -n -o "import=/rtorrent.rc" &
else
rtorrent -n -o "import=/rtorrent.rc" &
fi
tail -f /tmp/rtorrent.log
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment