squid/cache_swap.sh
Michal Luscon 9ed7cc7ee0 Resolved: #854356 - squid.service use PIDFile
Resolved: #859393 - Improve cache_swap script
Resolved: #791129 - disk space warning
Resolved: #862252 - reload on VPN or network up/down
Resolved: #867531 - run test suite during build
Resolved: #832684 - missing after dependency nss-lookup.target
Removed obsolete configure options
2012-10-26 16:21:30 +02:00

17 lines
380 B
Bash

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