|
发表于 2006-8-3 14:05:56
|
显示全部楼层
来自 中国–四川–成都
回复: linux 下怎么用命令重新启动正在运行的cs服务
Post by tnt1980
做一个脚本
我是这样做的
case $1 in
start)
echo "cs1.6 start"
cd /home/cs/hlserver
export LD_LIBRARY_PATH=/usr/cs16/hlds_l:$LD_LIBRARY_PATH
# until false
# do
nice -20 ./hlds_run -pingboost 3 -game cstrike +port 7777 -nomaster -insecure +sv_lan 1 +sv_region 4 +ip 218.87.100.4 +servercfgfile ...
我在redhat9下按你这个脚本改的 运行是出现这样的错
./cs.sh: line 1:SYNTAX ERROR NEAR UNEXPECED TOKEN 'in
./cs.sh: line 1: 'CASE $1 IN
请问这是什么原因
我是要样写的
case $1 in
start)
echo "cs1.6 start"
cd /home/hlds_l
export LD_LIBRARY_PATH=/home/hlds_l:$LD_LIBRARY_PATH
# until false
# do
nice -20 ./hlds_run -pingboost 3 -game cstrike +port 27017 -nomaster -insecure +sv_lan 1 +sv_region 4 +maxplayers 14 +map de_dust2 > /dev/null &
;;
stop)
echo "cs1.6 stop"
ps -aux|grep 27017|grep -v grep|awk '{print$2}'|xargs kill -9
;;
esac |
|