其实很菜的哈哈

#!/bin/bash#gjgameserverstartprocedure#xcnqq:995345781#version2.0PATH_DIR=/application/game/game002prog=game002start(){["$EUID"!="0"]&&exit4cd/application/game/game002/./game002-decho-n$"starting$prog:"if["$?"-ne0]thenecho"starterro"fi}stop(){["$EUID"!="0"]&&exit4echo-n$"stopingdown$prog:"kill`cat$PATH_DIR/server.pid`}case"$1"instart)start;;stop)stop;;*)echo$"usage:$0{start|stop}"exit2esac