]> git.ipfire.org Git - ipfire-3.x.git/blame - squid/cache_swap.sh
make: Update to 4.2.1
[ipfire-3.x.git] / squid / cache_swap.sh
CommitLineData
217da106
CS
1#!/bin/bash
2if [ -f /etc/sysconfig/squid ]; then
3 . /etc/sysconfig/squid
4fi
5
6SQUID_CONF=${SQUID_CONF:-"/etc/squid/squid.conf"}
7
8CACHE_SWAP=`sed -e 's/#.*//g' $SQUID_CONF | \
9 grep cache_dir | awk '{ print $3 }'`
10
11for 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
16done