SHA256
1
0
forked from pool/squid
squid/initialize_cache_if_needed.sh

14 lines
284 B
Bash
Raw Normal View History

#!/bin/sh
DIR=$(dirname $0)
CACHE_DIR=$($DIR/cache_dir.sed < /etc/squid/squid.conf)
if [ 'x'$CACHE_DIR = 'x' ]; then
exit 0
fi
if ! test -d $CACHE_DIR; then
echo "Initializing cache directories..."
exec /usr/sbin/squid -z -F --foreground -S -f /etc/squid/squid.conf
fi