其实很菜的哈哈
#!/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
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。