]>
Commit | Line | Data |
---|---|---|
9aee221f ŁK |
1 | #!/bin/sh |
2 | ||
3 | # determine which one is the cache_swap directory | |
4 | CACHE_SWAP=$(awk '/^cache_dir/{print $3}' /etc/squid/squid.conf) | |
5 | [ -z "$CACHE_SWAP" ] && CACHE_SWAP=/var/cache/squid | |
6 | ||
7 | need_init=0 | |
8 | for dir in $CACHE_SWAP; do | |
9 | if [ ! -d $dir/00 ]; then | |
10 | need_init=1 | |
11 | fi | |
12 | done | |
13 | if [ $need_init = 1 ]; then | |
14 | squid -z -F -D >> /var/log/squid/squid.out 2>&1 | |
15 | fi | |
16 | exit 0 |