Re:A better way to start Squid at boot time?

From: Bernat Ginard Lladó <bernat@dont-contact.us>
Date: Tue, 09 Nov 1999 11:42:24 +0100

Hello,

I think the best way to start squid at the boot time is to use a
/etc/rc.d start|stop script.

Here the one I use (is one from the SuSE Linux slightly modifiyed to fit
into my system, not using the rpm that comes with SuSE).

>Hi,
>
>Some might have seen my earlier post that I was having a problem with
>Periodic Daily causing Squid to restart several times.
>
>I have narrowed it down to the /etc/rc.local file where as the last line
>I have put;
>/usr/local/squid/bin/RunCache&
>
>If I comment this out Periodic will not cause Squid to restart.
>(It is not a script it runs as I have removed all scripts from
>/etc/periodic/daily and it still occurs)
>
>Should I have squid starting a different wayat boot (is there another >way?)
>or is this an issue with Periodic?
>
>Thanks
>
>Ray

#! /bin/sh
# Copyright (c) 1996,98 S.u.S.E. Gmbh Fuerth, Germany. All rights reserved.
#
# Author: Florian La Roche <florian@suse.de>, 1996
#
# /sbin/init.d/squid
#

SQUID_DIR=/usr/local/squid

# Determine the base and follow a runlevel link name.
base=${0##*/}
link=${base#*[SK][0-9][0-9]}

case "$1" in
    start)
        if test ! -d ${SQUID_DIR}/cache/00 ; then
                echo "Initializing the cache for the WWW-proxy squid."
                su squid -c "${SQUID_DIR}/bin/squid -z"
        fi
        echo "Starting WWW-proxy squid:"
        startproc -l ${SQUID_DIR}/logs/squid.out ${SQUID_DIR}/bin/squid -sYD
        ;;
    stop)
        echo "Shutting down WWW-proxy squid:"
        ${SQUID_DIR}/bin/squid -k shutdown 2>/dev/null
        killproc ${SQUID_DIR}/bin/squid
        ;;
    status)
        echo -n "Checking for WWW-proxy squid: "
        checkproc ${SQUID_DIR}/bin/squid && echo OK || echo No process
        ;;
    restart)
        $0 stop && $0 start
        ;;
    reload)
        echo -n "Reloading WWW-proxy squid:"
        ${SQUID_DIR}/bin/squid -k reconfigure
        echo -e "$return"
        ;;
    *)
        echo "Usage: $0 {start|stop|status|restart|reload}"
        exit 1
esac

exit 0
Received on Tue Nov 09 1999 - 04:00:16 MST

This archive was generated by hypermail pre-2.1.9 : Wed Apr 09 2008 - 11:57:32 MDT