标签:启动脚本 gameserver
其实很菜的哈哈
#!/bin/bash
#gj game server start procedure
#xcn qq:995345781
#version 2.0
PATH_DIR=/application/game/game002
prog=game002
start() {
[ "$EUID" != "0" ] && exit 4
cd /application/game/game002/
./game002 -d
echo -n $"starting $prog:"
if [ "$?" -ne 0 ]
then
echo "start erro"
fi
}
stop() {
[ "$EUID" != "0" ] && exit 4
echo -n $"stoping down $prog:"
kill `cat $PATH_DIR/server.pid`
}
case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo $"usage:$0 {start|stop}"
exit 2
esac本文出自 “小菜鸟” 博客,请务必保留此出处http://baishuchao.blog.51cto.com/12918589/1939993
标签:启动脚本 gameserver
原文地址:http://baishuchao.blog.51cto.com/12918589/1939993