remove stale pid file on startup
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
78d1fdde09
commit
7edc11a6ee
@ -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}"
|
||||||
@ -20,9 +23,10 @@ coredump_dir ${SQUID_COREDUMP_DIR}
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ ! -d "${SQUID_CACHE_DIR}/00" ]; then
|
if [ ! -d "${SQUID_CACHE_DIR}/00" ]; then
|
||||||
squid -z
|
squid -z
|
||||||
sleep 5
|
sleep 5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
squid
|
[ -e "${PIDFILE}" ] && rm "${PIDFILE}"
|
||||||
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user