How to start the squid service at boot time? - Linux

This is a discussion on How to start the squid service at boot time? - Linux ; My system configuration: Fedora 1 Squid-2.5.STABLE4 I created a file called 'squid' in the /etc/init.d folder. This file has the start and stop functions. I am able to start/stop the process from command line as /etc/init.d/squid . Once the process ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: How to start the squid service at boot time?

  1. How to start the squid service at boot time?

    My system configuration:
    Fedora 1
    Squid-2.5.STABLE4

    I created a file called 'squid' in the /etc/init.d folder. This file
    has the start and stop functions.
    I am able to start/stop the process from command line as
    /etc/init.d/squid . Once the process starts, I can use the
    proxy server.
    I used '/sbin/chkconfig --add squid' and '/sbin/chkconfig --level 5
    squid on`.
    When I boot up the system, I can see from the boot messages that
    'squid' has been started succesfully. However, when I log in, I do not
    see the squid process running.
    The system log files show a succesful start up in /var/log/boot.log
    and /var/log/messages.
    The log files for the Squid have no entries.

    What could be the problem?

    I am including the stop, start functions in the /etc/init.d/squid
    file:
    ----------------------------------------------------------------------
    start)
    echo -n "Starting $SQUID: "
    echo "pkj: $SQUID_HOME/bin/RunCache $SQUID_OPTS &"
    $SQUID_HOME/bin/RunCache $SQUID_OPTS &
    RETVAL=$?
    echo $SQUID
    echo "pkj: the return val= $RETVAL \n"
    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/squid
    ;;

    stop)
    echo -n "Stopping $SQUID: "
    $SQUID_HOME/sbin/squid -k shutdown &
    RETVAL=$?
    if [ $RETVAL -eq 0 ] ; then
    echo "the return val= $RETVAL \n"
    rm -f /var/lock/subsys/squid
    while : ; do
    [ -f /var/run/squid.pid ] || break
    sleep 2 && echo -n "."
    done
    echo "done"
    else
    echo
    fi
    ;;

  2. Re: How to start the squid service at boot time?

    "Prashant Jha" wrote in message
    news:12fe01cf.0312272223.6df8eede@posting.google.c om

    > When I boot up the system, I can see from the boot messages that
    > 'squid' has been started succesfully. However, when I log in, I do not
    > see the squid process running.
    > The system log files show a succesful start up in /var/log/boot.log
    > and /var/log/messages.
    > The log files for the Squid have no entries.
    >
    > What could be the problem?


    Why do you think there's a problem?


    --
    use hotmail for any email replies


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

  3. Re: How to start the squid service at boot time?

    "ynotssor" <"ynotssor"> wrote in message news:<3feea34d_4@corp.newsgroups.com>...
    > "Prashant Jha" wrote in message
    > news:12fe01cf.0312272223.6df8eede@posting.google.c om
    >
    > > When I boot up the system, I can see from the boot messages that
    > > 'squid' has been started succesfully. However, when I log in, I do not
    > > see the squid process running.
    > > The system log files show a succesful start up in /var/log/boot.log
    > > and /var/log/messages.
    > > The log files for the Squid have no entries.
    > >
    > > What could be the problem?

    >
    > Why do you think there's a problem?



    The problem is that when I log in, I do not see the squid process running.

  4. Re: How to start the squid service at boot time?

    prashant1512@hotmail.com (Prashant Jha) wrote in message news:<12fe01cf.0312280953.20dcf441@posting.google.com>...
    > "ynotssor" <"ynotssor"> wrote in message news:<3feea34d_4@corp.newsgroups.com>...
    > > "Prashant Jha" wrote in message
    > > news:12fe01cf.0312272223.6df8eede@posting.google.c om
    > >
    > > > When I boot up the system, I can see from the boot messages that
    > > > 'squid' has been started succesfully. However, when I log in, I do not
    > > > see the squid process running.
    > > > The system log files show a succesful start up in /var/log/boot.log
    > > > and /var/log/messages.
    > > > The log files for the Squid have no entries.
    > > >
    > > > What could be the problem?

    > >
    > > Why do you think there's a problem?

    >
    >
    > The problem is that when I log in, I do not see the squid process running.


    I was able to fix the problem. The start function was calling the
    script /usr/local/squid/bin/RunCache. In this script, the binary
    executable /usr/local/squid/sbin/squid was being called with the -N
    option. This meant squid could not daemonize itself. I am now calling
    the squid executable directly, without the -N option from the init.d
    script, and it works fine.

+ Reply to Thread