Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2769 → Rev 2770

/scripts/alcasar-bl.sh
33,7 → 33,6
DIR_IP_BL_ENABLED="$DIR_SHARE/iptables-bl-enabled" # ' ' ip BL (only enabled categories)
DIR_IP_WL_ENABLED="$DIR_SHARE/iptables-wl-enabled" # ' ' ip WL (ossi and ossi-* imported from ACC)
REHABILITATED_DNS_FILE="/etc/unbound/conf.d/blacklist/rehabilitated.conf"
CNC_BL_NAME="ossi-bl-candc"
BL_SERVER="dsi.ut-capitole.fr"
SED="/bin/sed -i"
 
110,7 → 109,7
# search for correction egrep "([a-zA-Z0-9_-.]+\.){1,2}[a-zA-Z]{2,$MAX_TLD}" $ossi_custom_dir/domains > $FILE_tmp
}
 
usage="Usage: alcasar-bl.sh { -cat_choice or --cat_choice } | { -download or --download } | { -adapt or --adapt } | { -reload or --reload } | { -install_ossi_candc or --install_ossi_candc }"
usage="Usage: alcasar-bl.sh { -cat_choice or --cat_choice } | { -download or --download } | { -adapt or --adapt } | { -reload or --reload }"
nb_args=$#
args=$1
if [ $nb_args -eq 0 ]
282,22 → 281,6
rm -f $FILE_tmp $FILE_ip_tmp
rm -rf $DIR_tmp
;;
# install C&C-Server Blacklist.
-install_ossi_candc | --install_ossi_candc)
## download
/usr/local/bin/alcasar-bl-autoupdate.sh --update_ossi-bl-candc
## enable blacklist by default by creating symlinks
if [ -e ${DIR_DNS_BL_ENABLED}/${CNC_BL_NAME} ]; then
rm ${DIR_DNS_BL_ENABLED}/${CNC_BL_NAME}
fi
if [ -e ${DIR_IP_BL_ENABLED}/${CNC_BL_NAME} ]; then
rm ${DIR_IP_BL_ENABLED}/${CNC_BL_NAME}
fi
echo "Creating symlinks to enable blacklist"
ln -s ${DIR_DNS_BL}/${CNC_BL_NAME}.conf ${DIR_DNS_BL_ENABLED}/${CNC_BL_NAME}
ln -s ${DIR_IP_BL}/${CNC_BL_NAME} ${DIR_IP_BL_ENABLED}/${CNC_BL_NAME}
exit 0
;;
# reload when selected categories are changed or when ossi change his custom files
-reload | --reload)
# for E2Gardian