Skip to content

Instantly share code, notes, and snippets.

@bulljit
Created January 23, 2011 00:00
Show Gist options
  • Save bulljit/791634 to your computer and use it in GitHub Desktop.
Save bulljit/791634 to your computer and use it in GitHub Desktop.
Transmission-Daemon: Update Blocklist
#!/bin/bash
# blocklist directory
BLOCKLISTDIR=/var/lib/transmission-daemon/info/blocklists
cd ${BLOCKLISTDIR}
if [ $? -eq 0 ]; then
if [ -f level1 ]; then
rm level1
fi
# if no blocklist file exist update blocklist
if [ ! -f level1 ]; then
wget -q -O level1.gz http://update.transmissionbt.com/level1.gz
# if download successful unzip it
if [ -f level1.gz ]; then
gunzip level1.gz
# if file extracted successfully reload transmission
if [ $? -eq 0 ]; then
chmod go+r level1
/etc/init.d/transmission-daemon reload
else
rm -f level1*
fi
fi
fi
cd - 2>&1 >/dev/null
fi
@bulljit
Copy link
Author

bulljit commented Jan 23, 2011

Transmission-Remote v1.90+ can also perform this via Cron:

@weekly /usr/bin/transmission-remote --blocklist-update

@bulljit
Copy link
Author

bulljit commented Jan 23, 2011

@bulljit
Copy link
Author

bulljit commented Jan 23, 2011

be sure to edit settings.json:

"blocklist-enabled": true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment