squid这个命令,系统找不到。
你可以把squid的路径加到环境变量的PATH里去。或者,自己改一下启动脚本。。。我不知道你的squid在哪里,估计应该在/usr/local/squid/bin里。
这样改代码。
#!/bin/sh
#
# $Id: RunCache.in,v 1.11 2005/05/17 16:56:36 hno Exp $
prefix=/usr/local/squid
exec_prefix=${prefix}
logdir=${prefix}/var #不知道这个logdir是干嘛用的???
bindir=${prefix}/bin
PATH=${exec_prefix}/sbin:/bin:/usr/bin

{bindir}
export PATH
conf=""
if test "$1" ; then
conf="-f $1"
shift
fi
failcount=0
while : ; do
echo "Running: squid -sY $conf >> $logdir/squid.out 2>&1"
echo "Startup: `date`" >> $logdir/squid.out
start=`date '+%d%H%M%S'`
squid -NsY $conf >> $logdir/squid.out 2>&1
stop=`date '+%d%H%M%S'`
t=`expr $stop - $start`
if test 0 -le $t -a $t -lt 5 ; then
failcount=`expr $failcount + 1`
else
failcount=0
fi
if test $failcount -gt 5 ; then
echo "RunCache: EXITING DUE TO REPEATED, FREQUENT FAILURES" >&2
exit 1
fi
sleep 10
done
希望这样能够解决问题。