Re: [squid-users] switching squid to another link using cron

From: Pascal Bourdais <PBourdais@dont-contact.us>
Date: Wed, 4 Apr 2001 15:43:54 +0200

> Then another different shell script to execute at 8am
>
> #!/bin/sh
>
> echo "Switching over to link2"
> /etc/rc.d/init.d/squid stop
> cp /etc/squid/squid.conf-link2 /etc/squid/squid.conf
> while [ -e /var/run/squid.pid ] ; do
> echo "trying to restart squid"
> sleep 4
> done
> /etc/rc.d/init.d/squid start
> echo "squid restarted"

I think your config files are broken somewhere !

wouldn't it be more efficiente to run :

# link2
<whereissquidbinary>/squid -k shutdown
sleep 4
<whereissquidbinary>/squid -f /etc/squid/squid.conf-link2 <and
otheroptionssuchas-D>

# link1
<whereissquidbinary>/squid -k shutdown
sleep 4
<whereissquidbinary>/squid -f /etc/squid/squid.conf-link1 <and
otheroptionssuchas-D>

Pascal
Received on Wed Apr 04 2001 - 07:36:54 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:59:09 MST