Skip to content

Commit

Permalink
# v1.0.2 加入日志功能
Browse files Browse the repository at this point in the history
  • Loading branch information
Toyo authored Sep 6, 2017
1 parent 39b8771 commit f1d6e65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions other/brook_centos
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ NAME="Brook"
NAME_BIN="brook"
FILE="/usr/local/brook"
CONF="${FILE}/brook.conf"
LOG="${FILE}/brook.log"

Green_font_prefix="\033[32m" && Red_font_prefix="\033[31m" && Green_background_prefix="\033[42;37m" && Red_background_prefix="\033[41;37m" && Font_color_suffix="\033[0m"
Info="${Green_font_prefix}[信息]${Font_color_suffix}"
Expand Down Expand Up @@ -59,9 +60,9 @@ do_start(){
cd ${FILE}
echo -e "${Info} $NAME 启动中..."
if [[ -z ${music} ]]; then
nohup ./brook bkserver -l :${port} -p ${passwd} -t ${timeout} -d ${deadline} > /dev/null 2>&1 &
nohup ./brook bkserver -l :"${port}" -p "${passwd}" -t "${timeout}" -d "${deadline}" > "${LOG}" 2>&1 &
else
nohup ./brook bkserver -l :${port} -p ${passwd} -t ${timeout} -d ${deadline} -m ${music} > /dev/null 2>&1 &
nohup ./brook bkserver -l :"${port}" -p "${passwd}" -t "${timeout}" -d "${deadline}" -m "${music}" > "${LOG}" 2>&1 &
fi
sleep 2s
check_running
Expand Down
5 changes: 3 additions & 2 deletions other/brook_debian
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ NAME="Brook"
NAME_BIN="brook"
FILE="/usr/local/brook"
CONF="${FILE}/brook.conf"
LOG="${FILE}/brook.log"

Green_font_prefix="\033[32m" && Red_font_prefix="\033[31m" && Green_background_prefix="\033[42;37m" && Red_background_prefix="\033[41;37m" && Font_color_suffix="\033[0m"
Info="${Green_font_prefix}[信息]${Font_color_suffix}"
Expand Down Expand Up @@ -57,9 +58,9 @@ do_start(){
cd ${FILE}
echo -e "${Info} $NAME 启动中..."
if [[ -z ${music} ]]; then
nohup ./brook bkserver -l :${port} -p ${passwd} -t ${timeout} -d ${deadline} > /dev/null 2>&1 &
nohup ./brook bkserver -l :"${port}" -p "${passwd}" -t "${timeout}" -d "${deadline}" > "${LOG}" 2>&1 &
else
nohup ./brook bkserver -l :${port} -p ${passwd} -t ${timeout} -d ${deadline} -m ${music} > /dev/null 2>&1 &
nohup ./brook bkserver -l :"${port}" -p "${passwd}" -t "${timeout}" -d "${deadline}" -m "${music}" > "${LOG}" 2>&1 &
fi
sleep 2s
check_running
Expand Down

0 comments on commit f1d6e65

Please sign in to comment.