flagflag  
2: 2012-11-19 (Mon) 22:07:12 s09081 source Cur: 2012-11-29 (Thu) 14:43:08 s09081 source
Line 4: Line 4:
 # make install  # make install
 # squid -z  # 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

100 user(s) are online (31 user(s) are browsing xpwiki)

Members: 0
Guests: 100

more...

Access Counter

Today : 380380380
Yesterday : 1185711857118571185711857
Total : 2361210723612107236121072361210723612107236121072361210723612107
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com