remove stale pid file on startup
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Paolo Asperti 2019-09-10 15:28:47 +02:00
parent 78d1fdde09
commit 7edc11a6ee
Signed by: paspo
GPG Key ID: 06D46905D19D5182

View File

@ -4,6 +4,9 @@ SQUID_CACHE_DIR=${SQUID_CACHE_DIR:-/var/spool/squid}
SQUID_COREDUMP_DIR=${SQUID_COREDUMP_DIR:-/var/cache/squid} SQUID_COREDUMP_DIR=${SQUID_COREDUMP_DIR:-/var/cache/squid}
SQUID_CACHE_SIZE_MB=${SQUID_CACHE_SIZE_MB:-10240} SQUID_CACHE_SIZE_MB=${SQUID_CACHE_SIZE_MB:-10240}
PIDFILE=/var/run/squid.pid
if [ ! -d "${SQUID_CACHE_DIR}" ]; then if [ ! -d "${SQUID_CACHE_DIR}" ]; then
mkdir -p "${SQUID_CACHE_DIR}" mkdir -p "${SQUID_CACHE_DIR}"
chown squid:squid "${SQUID_CACHE_DIR}" chown squid:squid "${SQUID_CACHE_DIR}"
@ -24,5 +27,6 @@ if [ ! -d "${SQUID_CACHE_DIR}/00" ]; then
sleep 5 sleep 5
fi fi
[ -e "${PIDFILE}" ] && rm "${PIDFILE}"
squid squid
tail -f /var/log/squid/access.log /var/log/squid/cache.log tail -f /var/log/squid/access.log /var/log/squid/cache.log