mirror of
https://github.com/b4tman/docker-squid.git
synced 2024-11-11 06:06:53 +00:00
16 lines
267 B
Bash
16 lines
267 B
Bash
|
#!/bin/sh
|
||
|
set -e
|
||
|
|
||
|
if [ "$1" = 'squid' ]; then
|
||
|
mkdir -p /var/log/squid
|
||
|
mkdir -p /var/cache/squid
|
||
|
|
||
|
if [ ! "$(ls -A /var/cache/squid)" ]; then
|
||
|
/usr/sbin/squid -f ${SQUID_CONFIG_FILE} -z
|
||
|
fi
|
||
|
|
||
|
exec /usr/sbin/squid -f ${SQUID_CONFIG_FILE} -NYCd 1
|
||
|
else
|
||
|
exec "$@"
|
||
|
fi
|