Old:UpHosts: differenze tra le versioni

update script
Nessun oggetto della modifica
(update script)
Riga 1: Riga 1:
==Introduzione==
==Introduzione==
Premessa: esistono svariati sistemi di content filtering decisamente più raffinati e personalizzabili di questo.
Premessa: esistono svariati sistemi di content filtering decisamente più raffinati e personalizzabili di questo.
Riga 52: Riga 51:
# http://hostsfile.mine.nu/downloads/updatehosts.sh.txt
# http://hostsfile.mine.nu/downloads/updatehosts.sh.txt


# 20100721 Paolo
# 20101107 Paolo


#-----------------------------------------------------------------------
#-----------------------------------------------------------------------
Riga 59: Riga 58:


HOSTSPATH="/tmp/hosts-`date +%s`" # Temp directory
HOSTSPATH="/tmp/hosts-`date +%s`" # Temp directory
HOSTSFILE="/etc/hosts" # Hosts file
HOSTSFILE="/etc/hosts" # Hosts file
ORIGFILE="$HOSTSFILE.original" # Backup file
ORIGFILE="$HOSTSFILE.original" # Backup file


CONFDIR="."
CONFDIR="`dirname $0`" #Absolute path of the running script
BLACKLIST="$CONFDIR/uphosts-blacklist" # Local Blacklist
BLACKLIST="$CONFDIR/uphosts-blacklist" # Local Blacklist
WHITELIST="$CONFDIR/uphosts-whitelist" # Whitelist
WHITELIST="$CONFDIR/uphosts-whitelist" # Whitelist
Riga 80: Riga 79:
builtin type -P wget    &>/dev/null || { echo "wget is missing."; ABORT=1; }
builtin type -P wget    &>/dev/null || { echo "wget is missing."; ABORT=1; }
builtin type -P unzip    &>/dev/null || { echo "unzip is missing."; ABORT=1; }
builtin type -P unzip    &>/dev/null || { echo "unzip is missing."; ABORT=1; }
builtin type -P fromdos  &>/dev/null || { echo "fromdos is missing."; ABORT=1; }
builtin type -P fromdos  &>/dev/null || { echo "fromdos(tofrodos) is missing."; ABORT=1; }
builtin type -P grep    &>/dev/null || { echo "grep is missing."; ABORT=1; }
builtin type -P grep    &>/dev/null || { echo "grep is missing."; ABORT=1; }


6

contributi