flagflag  

SQUID anchor.png

# ./configure --prefix=/usr/local/squid --with-large-files  --with-default-user=squid
# make
# make install
# squid -z
Page Top

Squid-3 anchor.png

 #adduser -s /sbin/nologin squid
 # ./configure --prefix=/usr/local/squid --with-large-files --with-default-user=squid
 #make
 #make install
 #!/bin/bash
  
 # Source function library.
 . /etc/rc.d/init.d/functions
  
 # install dir
 prefix=/usr/local/squid
 # exec dir
 exec_prefix=${prefix}
 # program name
 progname=squid
 # lock file
 lockfile=${prefix}/var/lock/subsys/${progname}
 # program path
 prog=${prefix}/sbin/squid
 # config file path
 conffile=${prefix}/etc/squid.conf
 # log file
 logfile=${prefix}/var/logs/squid.out
 # PID file
 pidfile=${prefix}/var/run/squid.pid
 # shutdown timeout
 stoptimeout=120
  
 RETVAL=0
  
 start() {
         echo -n $"Starting $progname: "
         $prog -f $conffile >> $logfile 2>&1
         RETVAL=$?
         [ $RETVAL -eq 0 ] && touch $lockfile
         [ $RETVAL -eq 0 ] && echo_success
         [ $RETVAL -ne 0 ] && echo_failure
         echo
         return $RETVAL
 }
  
 stop() {
         echo -n $"Stopping $progname: "
         $prog -k shutdown -f $conffile >> $logfile 2>&1
         RETVAL=$?
         if [ $RETVAL -eq 0 ] ; then
                 rm -f $lockfile
                 timeout=0;
                 while : ; do
                         [ -f $pidfile ] || break
                         if [ $timeout -ge $stoptimeout ]; then
                                 RETVAL=1
                                 break
                         fi
                         sleep 1 && echo -n "."
                         timeout=$((timeout+1))
                 done
                 echo_success
                 echo
         else
                 echo_failure
                 if [ ! -e $lockfile ]; then
                         RETVAL=0
                 fi
                 echo
         fi
         return $RETVAL
 }
  
 reload() {
         $prog -k reconfigure -f $conffile
 }
  
 restart() {
         stop
         start
 }
  
 rhstatus() {
         status $prog && $prog -k check -f $conffile
 }
  
  
 case "$1" in
 start)
         start
         ;;
  
 stop)
         stop
         ;;
  
 reload|force-reload)
         reload
         ;;
  
 restart)
         restart
         ;;
  
  
 status)
         rhstatus
         ;;
  
 *)
         echo $"Usage: $0 {start|stop|status|reload|force-reload}"
         exit 2
 esac
  
 exit $?

Front page   Freeze Diff Backup Copy Rename Reload   New List of Pages Search Recent changes   Help   RSS of recent changes (RSS 1.0) RSS of recent changes (RSS 2.0) RSS of recent changes (RSS Atom)
Counter: 983, today: 1, yesterday: 1
Last-modified: 2012-11-29 (Thu) 14:43:08 (JST) (4168d) by s09081

Site Search

Login

Username:

Password:


Lost Password?
Register now!!

Sub Menu

mini Calendar

Last MonthApr 2024Next Month
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Today

Who's Online

79 user(s) are online (22 user(s) are browsing xpwiki)

Members: 0
Guests: 79

more...

Access Counter

Today : 1527415274152741527415274
Yesterday : 2042920429204292042920429
Total : 2339468023394680233946802339468023394680233946802339468023394680
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com