]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - squid/cache_swap.sh
Merge remote-tracking branch 'stevee/pcre'
[people/ms/ipfire-3.x.git] / squid / cache_swap.sh
1 #!/bin/bash
2 if [ -f /etc/sysconfig/squid ]; then
3 . /etc/sysconfig/squid
4 fi
5
6 SQUID_CONF=${SQUID_CONF:-"/etc/squid/squid.conf"}
7
8 CACHE_SWAP=`sed -e 's/#.*//g' $SQUID_CONF | \
9 grep cache_dir | awk '{ print $3 }'`
10
11 for adir in $CACHE_SWAP; do
12 if [ ! -d $adir/00 ]; then
13 echo -n "init_cache_dir $adir... "
14 squid -z -F -f $SQUID_CONF >> /var/log/squid/squid.out 2>&1
15 fi
16 done