Skip to content

Instantly share code, notes, and snippets.

@gene1wood
Created February 26, 2013 18:16
Show Gist options
  • Save gene1wood/5040735 to your computer and use it in GitHub Desktop.
Save gene1wood/5040735 to your computer and use it in GitHub Desktop.
Some simple logic to put the IP address of a specific interface into your /etc/sysconfig/transmission-daemon to get it to bind to that interface while issue https://trac.transmissionbt.com/ticket/2313 gets worked out. This applies to RHEL based installations.
# Username/password example
# DAEMON_ARGS="-b -t -a \"*.*.*.*\" -e /var/log/transmission/transmission.log"
# No username/password, but limited to 192.168.1.*
# DAEMON_ARGS="-b -T -a \"192.168.1.*\" -e /var/log/transmission/transmission.log"
INTERFACE=ppp0
if ifconfig $INTERFACE >>/dev/null 2>&1; then
BIND_ADDR="`/sbin/ifconfig $INTERFACE | awk '$1 == \"inet\" {print $2}' | awk -F: '{print $2}'`"
else
BIND_ADDR="127.0.0.1"
fi
DAEMON_ARGS="--bind-address-ipv4 $BIND_ADDR"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment