Skip to content

Instantly share code, notes, and snippets.

@fritolays
Forked from gregwym/blocklists.synology.sh
Last active May 30, 2018 02:41
Show Gist options
  • Save fritolays/a234fb66ebf59525c93d48a6d0992a27 to your computer and use it in GitHub Desktop.
Save fritolays/a234fb66ebf59525c93d48a6d0992a27 to your computer and use it in GitHub Desktop.
Enable and update blocklists for Synology Download Station
#!/bin/sh
# Script for blocking IP's
# Set path
cd /var/packages/DownloadStation/etc/download/blocklists
# Permissions
chmod 777 ../settings.json
# Edit config file (block)
sed -i -e 's|\(^\s*"blocklist-enabled":\)[^,]*|\1 true|' -e 's|\(^\s*"blocklist-url":\)[^,]*|\1 ""|' ../settings.json
# Obtain block file
wget --content-disposition "http://john.bitsurge.net/public/biglist.p2p.gz"
# Extract file
gunzip -f *.gz
# Set time
touch biglist.p2p
# Restart service
#/var/packages/DownloadStation/target/scripts/S25download.sh restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment