From 93a37196982895d514d9af17748723467c4c7443 Mon Sep 17 00:00:00 2001 From: Toyo Date: Sun, 9 Apr 2017 11:50:05 +0800 Subject: [PATCH] Add files via upload --- other/brook_centos | 12 ++++++------ other/brook_debian | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/other/brook_centos b/other/brook_centos index 6c2b63b1..9ba83f57 100644 --- a/other/brook_centos +++ b/other/brook_centos @@ -23,7 +23,7 @@ Error="${Red_font_prefix}[错误]${Font_color_suffix}" RETVAL=0 check_running(){ - PID=`ps -ef |grep "${NAME_BIN}" |grep -v "grep" |grep -v "init.d" |grep -v "service" |awk '{print $2}'` + PID=`ps -ef |grep "${NAME_BIN}" |grep -v "grep" | grep -v ".sh"| grep -v "init.d" |grep -v "service" |awk '{print $2}'` if [[ ! -z ${PID} ]]; then return 0 else @@ -32,11 +32,11 @@ check_running(){ } read_config(){ [[ ! -e ${CONF} ]] && echo -e "${Error} Brook 配置文件不存在 !" && exit 1 - port=`cat ${brook_conf}|grep "port"|awk -F "=" '{print $NF}'` - passwd=`cat ${brook_conf}|grep "passwd"|awk -F "=" '{print $NF}'` - timeout=`cat ${brook_conf}|grep "timeout"|awk -F "=" '{print $NF}'` - deadline=`cat ${brook_conf}|grep "deadline"|awk -F "=" '{print $NF}'` - music=`cat ${brook_conf}|grep "music"|awk -F "=" '{print $NF}'` + port=`cat ${CONF}|grep "port"|awk -F "=" '{print $NF}'` + passwd=`cat ${CONF}|grep "passwd"|awk -F "=" '{print $NF}'` + timeout=`cat ${CONF}|grep "timeout"|awk -F "=" '{print $NF}'` + deadline=`cat ${CONF}|grep "deadline"|awk -F "=" '{print $NF}'` + music=`cat ${CONF}|grep "music"|awk -F "=" '{print $NF}'` } View_User(){ ip=`wget -qO- -t1 -T2 ipinfo.io/ip` diff --git a/other/brook_debian b/other/brook_debian index 01cd8cdb..7ce00f9a 100644 --- a/other/brook_debian +++ b/other/brook_debian @@ -21,7 +21,7 @@ Error="${Red_font_prefix}[错误]${Font_color_suffix}" RETVAL=0 check_running(){ - PID=`ps -ef |grep "${NAME_BIN}" |grep -v "grep" |grep -v "init.d" |grep -v "service" |awk '{print $2}'` + PID=`ps -ef |grep "${NAME_BIN}" |grep -v "grep" | grep -v ".sh"| grep -v "init.d" |grep -v "service" |awk '{print $2}'` if [[ ! -z ${PID} ]]; then return 0 else @@ -30,11 +30,11 @@ check_running(){ } read_config(){ [[ ! -e ${CONF} ]] && echo -e "${Error} Brook 配置文件不存在 !" && exit 1 - port=`cat ${brook_conf}|grep "port"|awk -F "=" '{print $NF}'` - passwd=`cat ${brook_conf}|grep "passwd"|awk -F "=" '{print $NF}'` - timeout=`cat ${brook_conf}|grep "timeout"|awk -F "=" '{print $NF}'` - deadline=`cat ${brook_conf}|grep "deadline"|awk -F "=" '{print $NF}'` - music=`cat ${brook_conf}|grep "music"|awk -F "=" '{print $NF}'` + port=`cat ${CONF}|grep "port"|awk -F "=" '{print $NF}'` + passwd=`cat ${CONF}|grep "passwd"|awk -F "=" '{print $NF}'` + timeout=`cat ${CONF}|grep "timeout"|awk -F "=" '{print $NF}'` + deadline=`cat ${CONF}|grep "deadline"|awk -F "=" '{print $NF}'` + music=`cat ${CONF}|grep "music"|awk -F "=" '{print $NF}'` } View_User(){ ip=`wget -qO- -t1 -T2 ipinfo.io/ip`