flagflag  
1: 2012-07-28 (Sat) 01:05:48 iseki source Cur: 2012-11-29 (Thu) 14:43:08 s09081 source
Line 1: Line 1:
*** SQUID [#r45215e8] *** SQUID [#r45215e8]
- # ./configure --with-large-files+ # ./configure --prefix=/usr/local/squid --with-large-files --with-default-user=squid
 # make  # make
 # make install  # make install
 + # squid -z
 +***Squid-3 [#a2a0d737]
 +  #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/${pro​gname}
 +  # 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   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)

Site Search

Login

Username:

Password:


Lost Password?
Register now!!

Sub Menu

mini Calendar

Last MonthMay 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 31
Today

Who's Online

21 user(s) are online (2 user(s) are browsing xpwiki)

Members: 0
Guests: 21

more...

Access Counter

Today : 5254525452545254
Yesterday : 8599859985998599
Total : 2365226023652260236522602365226023652260236522602365226023652260
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com