From 2d06520c7debf23a28a929b28ba77182946b33b6 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 2 Sep 2021 20:04:14 +0100 Subject: [PATCH] fix executable name with ss command --- lgsm/functions/info_messages.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index f68d12e4f..ac429ff28 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -686,7 +686,7 @@ fn_info_message_ports(){ elif [ "${engine}" == "goldsrc" ]; then echo -e "ss -tuplwn | grep hlds_linux" else - executableshort="$(echo "${executable//.\/}" | cut -c -15)" + executableshort="$(basename "${executable}" | cut -c -15)" echo -e "ss -tuplwn | grep ${executableshort}" fi echo -e "" @@ -1713,8 +1713,7 @@ fn_info_message_select_engine(){ fn_info_message_spark elif [ "${engine}" == "unreal" ]; then fn_info_message_unreal - else - fn_print_error_nl "Unable to detect server engine." + fn_print_error_nl "Unable to detect game server." fi }