#!/bin/sh export LANG="zh_CN.UTF-8"
# export MONO_IOMAP="all"
# export MONO_EXTERNAL_ENCODINGS="gbk:gb18030:gb2312"
ulimit -SHn >/dev/null >& PORT= C_DIR=$(pwd)
TN_HOME=$(cd $(dirname $);pwd) if [ "$1" = "-b" ]; then
cd ${TN_HOME}
${TN_HOME}/TinyFox -p ${PORT} $@ >/dev/null >& &
cd ${C_DIR}
exit
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
fi kill - $pid
exit
fi cd ${TN_HOME}
${TN_HOME}/TinyFox -p ${PORT} $@
cd ${C_DIR} exit