Proyecto

General

Perfil

« Anterior | Siguiente » 

Revisión 27

Eliminado problema wget

Ver diferencias:

deny_https
DENY_HTTPS=/etc/network/deny_https.conf
DENY_HTTPS_ALL=/etc/network/$FICHERO
DENY_HTTPS_IES=/etc/network/deny_https.ies
#RUTA=http://desarrollo.educarex.es/linex/projects/servidoressecundaria/repository/entry/limitar-https/trunk
RUTA=http://172.16.16.254/linex/projects/servidoressecundaria/repository/entry/limitar-https/trunk
RUTA=http://desarrollo.educarex.es/linex/projects/servidoressecundaria/repository/entry/limitar-https/trunk
#RUTA=http://172.16.16.254/linex/projects/servidoressecundaria/repository/entry/limitar-https/trunk
RED=`ifconfig | grep Bcast | cut -f2 -d: | awk '{print }' | cut -f1 -d.`
#----------------------------------------------------------------------------------------
if [ -s $DENY_HTTPS_ALL ]; then mv $DENY_HTTPS_ALL $DENY_HTTPS_ALL.old; fi
# Descarga el fichero general de https a denegar por todos los IES
wget -q -O $DENY_HTTPS_ALL $RUTA/$FICHERO?format=raw
#if [ -s $DENY_HTTPS_ALL ]; then mv $DENY_HTTPS_ALL $DENY_HTTPS_ALL.old; fi
#wget -T 10 -q -O $DENY_HTTPS_ALL $RUTA/$FICHERO?format=raw
#if [ ! -s $DENY_HTTPS_ALL ]; then
# if [ -s $DENY_HTTPS_ALL.old ]; then
# cat $DENY_HTTPS_ALL.old >> $DENY_HTTPS_ALL
# fi
#fi
if [ ! -s $DENY_HTTPS_ALL ]; then
if [ -s $DENY_HTTPS_ALL.old ]; then
cat $DENY_HTTPS_ALL.old >> $DENY_HTTPS_ALL
fi
fi
if [ ! -f $DENY_HTTPS_ALL ]; then touch $DENY_HTTPS_ALL; fi
# Unimos y filtramos los ficheros de configuración
cat $DENY_HTTPS_ALL $DENY_HTTPS_IES | egrep -v '#|^$' | awk '{print $1}' | sort | uniq > $DENY_HTTPS
......
done
echo " ----------------------------------------------"
echo " * EL TRAFICO HTTPS ESTA RESTRINGIDO."
echo ""
}
do_stop() {
......
iptables-restore < /etc/network/iptables
echo " -----------------------------------------------"
echo " * EL TRAFICO HTTPS ESTA LIBERADO."
echo ""
}
do_restart() {
......
case "$1" in
start)
do_start
do_status
# do_status
;;
stop)
do_stop
do_status
# do_status
;;
restart|force-reload)
do_restart
do_status
# do_status
;;
status)
do_status

Exportar a: Unified diff