SHA256
1
0
forked from pool/squid
squid/initialize_cache_if_needed.sh
Martin Pluskal 901a4dfe17 Accepting request 578251 from home:adamm:branches:server:proxy
- Spec file cleanup:
  + Drop unused fillup template - it's not used by systemd script
  + Drop %pretrans section which is only used to upgrade from
    version 3.4 of squid - no supported codestream has that version.
  + Drop explicit BR: on systemd-rpm-macros
- Update squid.service systemd file
  + Don't need to use squid to manage squid anymore
  + Drop references to default config file, since it's default
- Drop reference to nonexistent EnvironmentFile in the service file

OBS-URL: https://build.opensuse.org/request/show/578251
OBS-URL: https://build.opensuse.org/package/show/server:proxy/squid?expand=0&rev=150
2018-02-20 07:30:53 +00:00

14 lines
259 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 --foreground -S
fi