]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/initscripts/init.d/squid
squid: Add french and spanish errorpages.
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / squid
index 7944c708ed943f6b7a95ea16df3b7ad9041b7e72..75dbbfa6bb5c6e2ca69ff5b5a4403d60813d01cd 100644 (file)
@@ -7,12 +7,13 @@
 chown -R squid:squid /var/log/squid
 chown -R squid:squid /var/log/squidGuard
 
+
 transparent() {
                DEVICE=$1
-               
+
                eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
                eval $(/usr/local/bin/readhash /var/ipfire/proxy/settings)
-               
+
                # If the proxy port is not set we set the default to 800.
                if [ -z $PROXY_PORT ]; then
                        PROXY_PORT=800
@@ -55,14 +56,22 @@ case "$1" in
                evaluate_retval
                exit
                fi
+
+
+               eval $(/usr/local/bin/readhash /var/ipfire/proxy/advanced/settings)
+               eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
+
                if [ -e /var/ipfire/proxy/enable -o -e /var/ipfire/proxy/enable_blue ]; then
+
+                       # Add Address to errorpage stylesheet
+                       sed "s|XXXhostXXX|$GREEN_ADDRESS|g" /var/ipfire/proxy/errorpage-$ERR_DESIGN.css > \
+                               /etc/squid/errorpage.css
+
                        boot_mesg "Starting Squid Proxy Server..."
                        loadproc /usr/sbin/squid -z >/dev/null 2>&1
                        loadproc /usr/sbin/squid
                fi
 
-               eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
-
                if [ -e /var/ipfire/proxy/transparent ]; then
                        transparent $GREEN_DEV
                fi