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

From: Stuart Clark <sclark@dont-contact.us>
Date: Wed, 4 Apr 2001 10:14:09 +1000

Hi ,
I am trying to switch squid to a different link during peak periods.
I put the shell script below into cron and have it execute at a certain time
eg :12am
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 run 2 squid.conf files

one having the below comments

tcp_outgoing_address 203.xxx.xxx.xx
udp_outgoing_address 203.xxx.xxx.xx

The second having this
(the standard default route is used)
#tcp_outgoing_address 203.xxx.xxx.xx
#udp_outgoing_address 203.xxx.xxx.xx

P.S. I am running 2 cache partitions
cache_dir ufs /cache1 7000 16 256
cache_dir ufs /cache 8000 16 256

Problem:
All was working fine for about 2 weeks then i started getting this output
below when the bash script executes

Starting squid: init_cache_dir ufs... init_cache_dir ufs... init_cache_dir
directory,... init_cache_dir of... init_cache_dir the... squid
2001/04/05 08:42:27| parseConfigFile: line 489 unrecognized: 'holds the #
metadata of objects saved on disk. It is used to rebuild the'
2001/04/05 08:42:27| parseConfigFile: line 491 unrecognized: ''cache_dir'
directory, but you may specify an alternate # pathname here. '
2001/04/05 08:42:27| parseConfigFile: line 492 unrecognized: 'Note you must
give a full filename, not just # a directory. Since this is'
2001/04/05 08:42:27| parseConfigFile: line 493 unrecognized: 'the index for
the whole object # list you CANNOT periodically rotate it! #'
2001/04/05 08:42:27| parseConfigFile: line 495 unrecognized: 'such as: # #
cache_swap_log.00 # cache_swap_log.01 # cache_swap_log.02 # #'
2001/04/05 08:42:27| parseConfigFile: line 496 unrecognized: 'The numbered
extension (which is added automatically) # corresponds to the'
2001/04/05 08:42:27| parseConfigFile: line 497 unrecognized: 'order of the
'cache_dir' lines in this # configuration file. If you'
2001/04/05 08:42:27| parseConfigFile: line 498 unrecognized: 'change the
order of the 'cache_dir' # lines in this file, then these log'
2001/04/05 08:42:27| parseConfigFile: line 499 unrecognized: 'files will NOT
correspond to # the correct 'cache_dir' entry (unless you'
2001/04/05 08:42:27| parseConfigFile: line 500 unrecognized: 'manually
rename # them). We recommend that you do NOT use this option. '
2001/04/05 08:42:27| parseConfigFile: line 501 unrecognized: 'It is # better
to keep these log files in each 'cache_dir' directory. #'

Regards
Stuart
Received on Wed Apr 04 2001 - 06:16:35 MDT

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