remove stale pid file on startup
continuous-integration/drone/push Build is passing Details

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
1 changed files with 6 additions and 2 deletions

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_CACHE_SIZE_MB=${SQUID_CACHE_SIZE_MB:-10240}
PIDFILE=/var/run/squid.pid
if [ ! -d "${SQUID_CACHE_DIR}" ]; then
mkdir -p "${SQUID_CACHE_DIR}"
chown squid:squid "${SQUID_CACHE_DIR}"
@ -20,9 +23,10 @@ coredump_dir ${SQUID_COREDUMP_DIR}
EOF
if [ ! -d "${SQUID_CACHE_DIR}/00" ]; then
squid -z
squid -z
sleep 5
fi
squid
[ -e "${PIDFILE}" ] && rm "${PIDFILE}"
squid
tail -f /var/log/squid/access.log /var/log/squid/cache.log