Skip to content

Instantly share code, notes, and snippets.

@sshilko
Forked from gene1wood/transmission-daemon
Created March 9, 2014 17:56
Show Gist options
  • Save sshilko/9451625 to your computer and use it in GitHub Desktop.
Save sshilko/9451625 to your computer and use it in GitHub Desktop.
# 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