码迷,mamicode.com
首页 > 系统相关 > 详细

tinyfox for linux 独立版 fox.sh

时间:2016-04-14 11:59:08      阅读:233      评论:0      收藏:0      [点我收藏+]

标签:

#!/bin/sh

export LANG="zh_CN.UTF-8"
# export MONO_IOMAP="all"
# export MONO_EXTERNAL_ENCODINGS="gbk:gb18030:gb2312"
ulimit -SHn 20000 >/dev/null 2>&1

PORT=80

C_DIR=$(pwd)
TN_HOME=$(cd $(dirname $0);pwd)


if [ "$1" = "-b" ]; then
  cd ${TN_HOME}
  ${TN_HOME}/TinyFox -p ${PORT}  $@ >/dev/null 2>&1 &
  cd ${C_DIR}
  exit 0
fi

if [ "$1" = "stop" ]; then
  pid=$(ps -ef|grep ${TN_HOME}/TinyFox |grep -v grep|awk {print $2})
  if [ "$pid" = "" ]; then
    echo "Can‘t Found...."
    exit 1
  fi

  kill -9 $pid
  exit 0
fi

cd ${TN_HOME}
${TN_HOME}/TinyFox  -p ${PORT} $@
cd ${C_DIR}

exit 0

 

tinyfox for linux 独立版 fox.sh

标签:

原文地址:http://www.cnblogs.com/gaobing/p/5390304.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!