mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Fixes #19. Centralises removing log new line characters.
This commit is contained in:
parent
b67e470543
commit
229d0fc67d
6
init/msm
6
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."
|
||||
|
Loading…
Reference in New Issue
Block a user