a86b838f19
- initialize_cache_if_needed.sh, squid_dir.sed: Initialize cache directory on startup if it is missing. Move scripts out of systemd service file and into individual files. (bnc#1030421) OBS-URL: https://build.opensuse.org/request/show/482004 OBS-URL: https://build.opensuse.org/package/show/server:proxy/squid?expand=0&rev=117
14 lines
274 B
Bash
14 lines
274 B
Bash
#!/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 -N -S -f /etc/squid/squid.conf
|
|
fi
|
|
|