Skip to content

Instantly share code, notes, and snippets.

@arno
arno / update-blocklists.sh
Created April 17, 2009 09:15
automatic download of common bluetack blocklists and update pf table
#!/bin/sh
#
# in /etc/pf.conf:
# table <p2p_blocklist> file "/etc/pfdata/p2p_blocklist"
# set limit table-entries 500000
# block log quick from <p2p_blocklist>
# block return log quick from any to <p2p_blocklist>
BLOCKLIST_URL="http://www.bluetack.co.uk/config"
DOWNLOAD_DIR="/tmp/blocklists"
#!/bin/sh
BLOCKLIST_DIR=/usr/local/etc/transmission/home/blocklists
BLOCKLIST_NAME=level1
BLOCKLIST_URL=http://update.transmissionbt.com/$BLOCKLIST_NAME.gz
tempdir=$(mktemp -d -q /tmp/transmission.XXXXXX)
if [ $? -ne 0 ]; then
echo "problem creating temp file, exiting..."
exit 1