mirror of
https://github.com/b4tman/docker-squid.git
synced 2025-09-06 01:17:33 +00:00
20 lines
401 B
Bash
20 lines
401 B
Bash
#!/bin/sh
|
|
|
|
set -x
|
|
|
|
# init ssl_db
|
|
if [ ! -d /var/cache/squid/ssl_db ]; then
|
|
/usr/lib/squid/security_file_certgen -c -s /var/cache/squid/ssl_db -M 4MB
|
|
fi
|
|
|
|
# force remove pid
|
|
if [ -e /var/run/squid/squid.pid ]; then
|
|
rm -f /var/run/squid/squid.pid
|
|
fi
|
|
|
|
# init cache
|
|
/usr/sbin/squid -f "${SQUID_CONFIG_FILE}" --foreground -z
|
|
|
|
# run squid
|
|
exec /usr/sbin/squid -f "${SQUID_CONFIG_FILE}" --foreground -YCd 1
|