mw@globe.de writes:
>Hi,
>
>I am thinking about the best and most secure way to start squid.
>This time, I start it from a script that is invoked once at boot time, but
>that does not satisfy me. Because if due to any circumstance stopping squid,
>it is never re-started. How can I manage to be sure squid is always up?
If your machine has /etc/inittab, run it from that.
cs:3:respawn:/usr/local/squid/bin/squid.sh < /dev/null >> /tmp/squid.log 2>&1
/usr/local/squid/bin/squid.sh:
#!/bin/sh
PATH=/usr/bin:/usr/local/squid/bin
notify=webmaster
cd /usr/local/squid
umask 022
/usr/bin/tail -20 logs/cache.log \
| /usr/bin/Mail -s "Squid restart on `hostname` at `date`" $notify
sleep 10
while [ -f /tmp/nosquid ]; do
sleep 1
done
exec /usr/bin/su nobody -c "exec squid -C >> squid.out 2>&1"
Received on Wed Sep 11 1996 - 11:01:38 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:32:59 MST