#!/bin/bash if [ $(pgrep -afc $0) -ne 0 ]; then echo Already running! exit 1; fi cd /root/.config/transmission/blocklists/ rm -Rf * wget 'http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz' -O blocklist.gz gunzip blocklist.gz; while [ "$?" -ne 0 ]; do echo Error $?: Couldn\'t get blocklist. wget 'http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz' -O blocklist.gz gunzip blocklist.gz; done /usr/bin/transmission-cli -b notorrent # Update the blocklist to a .bin format