DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2012-12-02 19:31:07

Old_Skool
New member
Registered: 2012-12-02
Posts: 2

cron job for iBlocklist downloads

I've tried it, but the DNS appears to get stuck in some redirect GET kind of loop.

I thought it would be easy-ish.  Simply set up script for downloading the iBlocklist zip file then unzip the thing into the right directory.

Instead there seems to be endless REDIRECTS from the iBlocklist server to oblivion.  I tried the limit redirect switch....didn't work.

I'm probably missing something easy.  The last time I wrote a script was 1991.

Any suggestions?

Offline

 

#2 2012-12-03 01:44:06

Old_Skool
New member
Registered: 2012-12-02
Posts: 2

Re: cron job for iBlocklist downloads

Here's the script I used (gratefully copied from ShadowAndy).  I put it in file <filename>.sh

I suspect there may be a file access problem - the script does not have the right to write to the file I specify for the download.....but I've been out of this stuff for too many years to really know.

Any/all suggestions welcome!




#!/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}"

Offline

 

#3 2012-12-03 13:38:17

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: cron job for iBlocklist downloads

The link you try to download gives me a 404. Isn't that the problem?

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB