Blocklist downloader (8)
Quite a few softwares utilizes blocklist in bluetack format. I’m using blocklist for my bittorrent applications and needed an easy way of downloading and unpacking the blocklist. Call me lazy if you like. Wrote a simple script to download the blocklist and unpack it.
Download: blocklist-downloader.sh
#!/ffp/bin/sh
#######################################
# Blocklist downloader
# Author: shadowandy.sg[AT]gmail.com
# Web: http://www.shadowandy.net
######################################### Setting the path
DOWNLOAD_DEST=/mnt/HD_a2/.transmission-daemon/blocklists##### You should not need to edit anything below #####
cd ${DOWNLOAD_DEST}
# backing up existing blocklist (if any)
for blocklist in “level1″ “level1.bin”
do
if test -f ${blocklist}; then
echo “Backing up ${blocklist}…”
mv -f ${blocklist} ${blocklist}.bak
fi
done
# downloading the blocklist
echo “Downloading new blocklist…”
curl –silent http://download.m0k.org/transmission/files/level1.gz > level1.gz
echo “Unpacking new blocklist…”
gunzip level1.gz
echo “Done. Blocklist downloaded and unpacked to ${DOWNLOAD_DEST}”
o.O looks like someone is already in holiday mood.. haha!
kev,
Nah! Need to work hard! Just taking a break by writing something. lolx
Great work! Would suggest that you might want to add the portion whereby to specific the -b option in transmission.sh.
Cheers
incom,
Yeap. I think your suggestion is great. Will do it.
[...] can use blocklist downloader to download the latest bluetack blocklist. Do run blocklist downloader before starting transmission [...]
I need help. download the blocklist and unpack it ? how do l unpack the script.
hmm.. so download the above file to :
/mnt/HD_a2/.transmission-daemon/blocklists
then edit transmission.sh with :
“su $user -c “$command -f -b -g ${TRANSMISSION_HOME} …”
restart the transmission and its all done with the blocklist?
Shidi,
I think you should go to transmissionbt website. Read up on what is blocklist, how to enable transmission blocklist support, where can you download the blocklist, what format the blocklist should be in and lastly where should the blocklist be.
Then you will know what this script does and where should you put the blocklist-downloader.sh
This script is to facilitate users who know what they are doing.