#!/bin/sh

###
## ATTENTION: this is an example. It is left here for educational purposes.
## A better example can be found in debian/cron.d/*
## 
## (This file might go away in the future)
###

# How often should this run? 
#  Once a day max

# crontab entry for this (proposal):
# # m h  dom mon dow   command
# 02  03 *   *   *     ( cd /tmp; /my/path/to/this/script )
# 

DEST=/opt/intelmq/var/lib/bots/tor_nodes
mkdir -p $DEST

export http_proxy=http://my.proxy.example.com:8080/


cd /tmp/
wget http://rules.emergingthreats.net/blockrules/emerging-tor.rules
mv /tmp/emerging-tor.rules $DEST/tor_nodes.dat
chown intelmq.intelmq -R $DEST



