Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Toyo authored Apr 9, 2017
1 parent 73f4fb7 commit 93a3719
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions other/brook_centos
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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`
Expand Down
12 changes: 6 additions & 6 deletions other/brook_debian
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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`
Expand Down

0 comments on commit 93a3719

Please sign in to comment.