From b957af66ecf4cbfa565f270c2d7025e335047a7e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 5 Jan 2019 21:54:56 +0000 Subject: [PATCH] feat(stop): update telent message to include port --- lgsm/functions/command_stop.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index f9042a4a5..34c9bf6e5 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -118,16 +118,16 @@ fn_stop_graceful_sdtd(){ elif [ "$(command -v expect 2>/dev/null)" ]; then # Tries to shutdown with both localhost and server IP. for telnetip in 127.0.0.1 ${ip}; do - fn_print_dots "Graceful: telnet: ${telnetip}" - fn_script_log_info "Graceful: telnet: ${telnetip}" + fn_print_dots "Graceful: telnet: ${telnetip}:${telnetport}" + fn_script_log_info "Graceful: telnet: ${telnetip}:${telnetport}" sleep 0.5 fn_stop_telnet_sdtd completed=$(echo -en "\n ${sdtd_telnet_shutdown}" | grep "Completed.") refused=$(echo -en "\n ${sdtd_telnet_shutdown}" | grep "Timeout or EOF") if [ -n "${refused}" ]; then - fn_print_error "Graceful: telnet: ${telnetip}: " + fn_print_error "Graceful: telnet: ${telnetip}:${telnetport} : " fn_print_fail_eol_nl - fn_script_log_error "Graceful: telnet: ${telnetip}: FAIL" + fn_script_log_error "Graceful: telnet: ${telnetip}:${telnetport} : FAIL" sleep 1 elif [ -n "${completed}" ]; then break @@ -141,9 +141,9 @@ fn_stop_graceful_sdtd(){ fn_stop_telnet_sdtd refused=$(echo -en "\n ${sdtd_telnet_shutdown}" | grep "Timeout or EOF") if [ -n "${refused}" ]; then - fn_print_ok "Graceful: telnet: ${telnetip}: " + fn_print_ok "Graceful: telnet: ${telnetip}:${telnetport}: " fn_print_ok_eol_nl - fn_script_log_pass "Graceful: telnet: ${telnetip}: ${seconds} seconds" + fn_script_log_pass "Graceful: telnet: ${telnetip}:${telnetport}: ${seconds} seconds" break fi sleep 1 @@ -155,7 +155,7 @@ fn_stop_graceful_sdtd(){ if [ -n "${refused}" ]; then fn_print_error "Graceful: telnet: " fn_print_fail_eol_nl - fn_script_log_error "Graceful: telnet: ${telnetip}: FAIL" + fn_script_log_error "Graceful: telnet: ${telnetip}:${telnetport}: FAIL" else fn_print_error_nl "Graceful: telnet: Unknown error" fn_script_log_error "Graceful: telnet: Unknown error"