mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 19:23:24 +02:00
squid init: small cosmetic fixes
- Deleted a few absolutely unneeded tabs. - Inserted/deleted some needed/unnecessary line breaks. Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
ef553dccc8
commit
bb91c2f744
@@ -33,16 +33,16 @@ transparent() {
|
|||||||
CONN_TYPE=`echo "$LINE" | awk -F, '{ print $5 }'`
|
CONN_TYPE=`echo "$LINE" | awk -F, '{ print $5 }'`
|
||||||
if [ "$CONN_TYPE" != "net" ]; then
|
if [ "$CONN_TYPE" != "net" ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
iptables -t nat -A SQUID -i $1 -p tcp -d `echo "$LINE" | awk -F, '{ print $13 }'` --dport 80 -j RETURN
|
iptables -t nat -A SQUID -i $1 -p tcp -d `echo "$LINE" | awk -F, '{ print $13 }'` --dport 80 -j RETURN
|
||||||
done < $FILE
|
done < $FILE
|
||||||
|
|
||||||
if [ "$RED_TYPE" == "STATIC" ]; then
|
if [ "$RED_TYPE" == "STATIC" ]; then
|
||||||
iptables -t nat -A SQUID -i $1 -p tcp -d $RED_NETADDRESS/$RED_NETMASK --dport 80 -j RETURN
|
iptables -t nat -A SQUID -i $1 -p tcp -d $RED_NETADDRESS/$RED_NETMASK --dport 80 -j RETURN
|
||||||
fi
|
fi
|
||||||
|
|
||||||
iptables -t nat -A SQUID -i $1 -p tcp -d $LOCALIP --dport 80 -j RETURN
|
iptables -t nat -A SQUID -i $1 -p tcp -d $LOCALIP --dport 80 -j RETURN
|
||||||
|
|
||||||
iptables -t nat -A SQUID -i $1 -p tcp --dport 80 -j REDIRECT --to-port "${TRANSPARENT_PORT}"
|
iptables -t nat -A SQUID -i $1 -p tcp --dport 80 -j REDIRECT --to-port "${TRANSPARENT_PORT}"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,6 @@ case "$1" in
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
eval $(/usr/local/bin/readhash /var/ipfire/proxy/advanced/settings)
|
eval $(/usr/local/bin/readhash /var/ipfire/proxy/advanced/settings)
|
||||||
eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
|
eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
|
||||||
|
|
||||||
@@ -100,7 +99,7 @@ case "$1" in
|
|||||||
evaluate_retval
|
evaluate_retval
|
||||||
|
|
||||||
# Stop squidGuard, updxlrator, squidclamav
|
# Stop squidGuard, updxlrator, squidclamav
|
||||||
# and redirect_wrappers.
|
# and redirect_wrappers.
|
||||||
killproc /usr/bin/squidGuard >/dev/null &
|
killproc /usr/bin/squidGuard >/dev/null &
|
||||||
killproc /usr/sbin/updxlrator >/dev/null &
|
killproc /usr/sbin/updxlrator >/dev/null &
|
||||||
killproc /usr/bin/squidclamav >/dev/null &
|
killproc /usr/bin/squidclamav >/dev/null &
|
||||||
@@ -123,7 +122,7 @@ case "$1" in
|
|||||||
killproc /usr/sbin/squid >/dev/null
|
killproc /usr/sbin/squid >/dev/null
|
||||||
|
|
||||||
# Trash remain pid file from squid.
|
# Trash remain pid file from squid.
|
||||||
rm -rf /var/run/squid.pid
|
rm -rf /var/run/squid.pid
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -141,7 +140,7 @@ case "$1" in
|
|||||||
statusproc /usr/sbin/squid
|
statusproc /usr/sbin/squid
|
||||||
statusproc /usr/lib/squid/unlinkd
|
statusproc /usr/lib/squid/unlinkd
|
||||||
;;
|
;;
|
||||||
|
|
||||||
flush)
|
flush)
|
||||||
$0 stop
|
$0 stop
|
||||||
echo > /var/log/cache/swap.state
|
echo > /var/log/cache/swap.state
|
||||||
@@ -149,6 +148,7 @@ case "$1" in
|
|||||||
sleep 1
|
sleep 1
|
||||||
$0 start
|
$0 start
|
||||||
;;
|
;;
|
||||||
|
|
||||||
setperms)
|
setperms)
|
||||||
chown -R nobody.squid /var/updatecache/
|
chown -R nobody.squid /var/updatecache/
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user