30 lines
539 B
Bash
30 lines
539 B
Bash
#!/bin/bash
|
|
# + 48h
|
|
LIMIT="-cmin +2880"
|
|
|
|
if [ -e "/run/squid.pid" ];then
|
|
echo "Squid pid: Already running ?"
|
|
rm /run/squid.pid
|
|
pkill squid
|
|
exit 1
|
|
fi
|
|
|
|
chown -R squid /var/log/squid
|
|
|
|
# check sup once before starting
|
|
# if env sup
|
|
|
|
/sup.sh
|
|
|
|
if [ $(grep -c "\-s\ /certs" /etc/squid/squid.conf) -ne 0 ];then
|
|
if [ ! -d /certs/ssl_db ]; then
|
|
/usr/lib/squid/security_file_certgen -c -s /certs/ssl_db -M 600MB
|
|
fi
|
|
chown -R squid:squid /certs
|
|
fi
|
|
|
|
echo "Starting: squid"
|
|
# Run autoreload: IN BACKGROUND
|
|
/autoreload.sh &
|
|
|