Created
January 23, 2011 00:00
-
-
Save bulljit/791634 to your computer and use it in GitHub Desktop.
Transmission-Daemon: Update Blocklist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
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
Transmission-Remote v1.90+ can also perform this via Cron: