LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   how squid service be start/restart in slackware (https://www.linuxquestions.org/questions/slackware-14/how-squid-service-be-start-restart-in-slackware-245208/)

LinuxLover 10-20-2004 02:22 PM

how squid service be start/restart in slackware
 
hello

I just configured squid in slackware
but one probleme faced
how squid service be start/restart in slackware

Waiting for reply

Pcghost 10-20-2004 03:04 PM

While I am not a Slack user, I would try the following

/etc/init.d/squid start

Works in other distros.

LinuxLover 10-20-2004 03:51 PM

dear Pcghost

.
Quote:

/etc/init.d/squid start
This works in redhat and other distros but not in salckware

in salckwre u can run some service from
like
/etc/rc.d/rc.sendmail start


but not squid like that

Thanks

rotvogel 10-20-2004 04:27 PM

Here is a script i use. Save it as rc.squid, make it executable and place it in /etc/rc.d. Could be you'll have to adjust the path.
Code:

#!/bin/sh
# Start/stop/restart the squid daemon.
#
squid_start() {
  if [ -x /usr/local/sbin/squid ]; then
    echo "Starting squid daemon:  "
    echo " /usr/local/sbin/squid -f /etc/squid/squid.conf"
    /usr/local/sbin/squid -f /etc/squid/squid.conf
  fi
}

squid_stop() {
  echo "Stopping squid daemon:  "
  killall squid 2> /dev/null
}

squid_restart() {
  squid_stop
  sleep 1
  squid_start
}

case "$1" in
'start')
  squid_start
  ;;
'stop')
  squid_stop
  ;;
'restart')
  squid_restart
  ;;
*)
  echo "usage $0 start|stop|restart"
esac


LinuxLover 10-22-2004 06:42 AM

Thanks
rotvogel


I configure the script as u mentioned . by it does not start squid service.

I give message "Starting squid daemon: "

but it does not start squid service.:confused:

Any futher suggestion:study:

waiting for

rotvogel 10-22-2004 07:16 AM

You'll have to adjust the script to your situation, my squid executable is in /usr/local/sbin and my config is in /etc/squid and is called squid.conf. When these settings are reflecting your situation and squid refuses to start maybe you should look in the log file what's going wrong. That would be cache.log I think. Locations of files are depending on what configure options you used.


All times are GMT -5. The time now is 04:18 PM.