3921f5
#!/bin/bash
3921f5
if [ -f /etc/sysconfig/squid ]; then
3921f5
	. /etc/sysconfig/squid
3921f5
fi
3921f5
3921f5
SQUID_CONF=${SQUID_CONF:-"/etc/squid/squid.conf"}
3921f5
3921f5
CACHE_SWAP=`sed -e 's/#.*//g' $SQUID_CONF | \
3921f5
	grep cache_dir | awk '{ print $3 }'`
3921f5
3921f5
for adir in $CACHE_SWAP; do
3921f5
	if [ ! -d $adir/00 ]; then
3921f5
		echo -n "init_cache_dir $adir... "
3921f5
		squid -N -z -F -f $SQUID_CONF >> /var/log/squid/squid.out 2>&1
3921f5
	fi
3921f5
done