diff --git a/README.md b/README.md index f66f21240..e20a114f1 100755 --- a/README.md +++ b/README.md @@ -201,6 +201,7 @@ For previous versions, please read: ## V3 changes +* v3.0, 2020-10-24, Refine script and startup logs. 3.0.148 * v3.0, 2020-10-23, Allow FFmpeg if exists at /usr/local/bin/ffmpeg. 3.0.147 * v3.0, 2020-10-23, Refine build script, use libssl in docker. 3.0.146 * v3.0, 2020-10-14, Fix [#1987][bug #1987], Fix Kbps resample bug. 3.0.145 diff --git a/trunk/etc/init.d/srs b/trunk/etc/init.d/srs index 0e2afca4b..66409a012 100755 --- a/trunk/etc/init.d/srs +++ b/trunk/etc/init.d/srs @@ -51,10 +51,10 @@ load_process_info() { pid_file=`(cd ${ROOT}; cd $pid_dir; pwd)`/`basename $pid_file` srs_pid=`cat $pid_file 2>/dev/null` - ret=$?; if [[ 0 -ne $ret ]]; then error_msg="file $pid_file does not exists"; return 1; fi + ret=$?; if [[ 0 -ne $ret ]]; then error_msg="No pid file $pid_file"; return 1; fi ps -p ${srs_pid} >/dev/null 2>/dev/null - ret=$?; if [[ 0 -ne $ret ]]; then error_msg="process $srs_pid does not exists"; return 2; fi + ret=$?; if [[ 0 -ne $ret ]]; then error_msg="Process $srs_pid does not exists"; return 2; fi return 0; } @@ -142,9 +142,9 @@ stop() { # @return 0 if srs is running; otherwise, 1 for stopped. status() { load_process_info - ret=$?; if [[ 0 -eq $ret ]]; then echo "SRS(pid ${srs_pid}) is running."; return 0; fi + ret=$?; if [[ 0 -eq $ret ]]; then ok_msg "SRS(pid ${srs_pid}) is running."; return 0; fi - echo "SRS is stopped, $error_msg" + failed_msg "Error: $error_msg" return 1 } diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index ec2136d29..41de78be0 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -1987,9 +1987,8 @@ srs_error_t SrsConfig::parse_options(int argc, char** argv) return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "no log file"); } if (get_log_tank_file()) { - srs_trace("write log to file %s", log_filename.c_str()); - srs_trace("you can: tailf %s", log_filename.c_str()); - srs_trace("@see: %s", SRS_WIKI_URL_LOG); + srs_trace("you can check log by: tail -f %s (@see %s)", log_filename.c_str(), SRS_WIKI_URL_LOG); + srs_trace("please check SRS by: ./etc/init.d/srs status"); } else { srs_trace("write log to console"); } @@ -3730,9 +3729,8 @@ srs_error_t SrsConfig::check_normal_config() return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "log file is empty"); } if (get_log_tank_file()) { - srs_trace("write log to file %s", log_filename.c_str()); - srs_trace("you can: tailf %s", log_filename.c_str()); - srs_trace("@see: %s", SRS_WIKI_URL_LOG); + srs_trace("you can check log by: tail -f %s (@see %s)", log_filename.c_str(), SRS_WIKI_URL_LOG); + srs_trace("please check SRS by: ./etc/init.d/srs status"); } else { srs_trace("write log to console"); } diff --git a/trunk/src/core/srs_core_version3.hpp b/trunk/src/core/srs_core_version3.hpp index b29289a07..df800600d 100644 --- a/trunk/src/core/srs_core_version3.hpp +++ b/trunk/src/core/srs_core_version3.hpp @@ -24,6 +24,6 @@ #ifndef SRS_CORE_VERSION3_HPP #define SRS_CORE_VERSION3_HPP -#define SRS_VERSION3_REVISION 147 +#define SRS_VERSION3_REVISION 148 #endif