Home
News
Forum
Wiki
Blog
Contents
Gallery
Movies
Downloads
About NSL
[
List of Titles
|
List of Pages
|
New
|
Search
|
Recent changes
|
Help
]
Squid
[
Front page
]
[ ]
Start:
*** SQUID
# ./configure --prefix=/usr/local/squid --with-large-fil...
# make
# make install
# squid -z
***Squid-3
#adduser -s /sbin/nologin squid
# ./configure --prefix=/usr/local/squid --with-large-fi...
#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 ...
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|forc...
exit 2
esac
exit $?
End:
*** SQUID
# ./configure --prefix=/usr/local/squid --with-large-fil...
# make
# make install
# squid -z
***Squid-3
#adduser -s /sbin/nologin squid
# ./configure --prefix=/usr/local/squid --with-large-fi...
#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 ...
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|forc...
exit 2
esac
exit $?
Page:
Site Search
Advanced Search
Login
Username:
Password:
Lost Password?
Register now!!
Sub Menu
New Arrivals
Books
Web Links
Site Map
e-Learning
TUIS Certificate
mini Calendar
May 2025
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
73 user(s) are online (2 user(s) are browsing xpwiki)
Members: 0
Guests: 73
more...
Access Counter
Today :
Yesterday :
Total :
Powered by XOOPS Cube 2.1© 2001-2006
XOOPS Cube Project
Design by
XoopsDesign.com