From 229d0fc67d3fd010accff994869631a06aac1883 Mon Sep 17 00:00:00 2001 From: Marcus Whybrow Date: Mon, 25 Jun 2012 15:47:59 +0100 Subject: [PATCH] Fixes #19. Centralises removing log new line characters. --- init/msm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init/msm b/init/msm index a9b0023..4e17115 100755 --- a/init/msm +++ b/init/msm @@ -438,7 +438,7 @@ server_log_get_line() { local regex="${LOG_REGEX} ${search_line}" # and matches the regular expression if [[ "$line" =~ $regex ]]; then - echo "$line" + echo "${line:0:${#line}-3}" return 0 fi done @@ -1847,11 +1847,11 @@ command_server_toggledownfall() { regex="${LOG_REGEX} ${server_confirm_toggledownfall[$1]}" if [[ "$line" =~ $regex ]]; then - echo "${line:36:${#line}-3}" + echo "${line:36}" fi regex="${LOG_REGEX} ${server_confirm_toggledownfall_fail[$1]}" if [[ "$line" =~ $regex ]]; then - echo "${line:34:${#line}-3}" + echo "${line:34}" fi else error_exit SERVER_STOPPED "Server \"${server_name[$1]}\" is not running."