From db4d3ccef4719d786d922dcbeff442710e1c51a9 Mon Sep 17 00:00:00 2001 From: Ryan Walters Date: Sun, 9 Aug 2020 14:32:50 -0500 Subject: [PATCH] fix: awk to properly grab the server pid when spaces are present in the session name (#2997) --- lgsm/functions/info_distro.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index c50953cdc..a8d61ce7e 100644 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -9,7 +9,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ### Game Server pid if [ "${status}" == "1" ]; then - gameserverpid=$(tmux list-sessions -F "#{session_name} #{pane_pid}" | grep "^${sessionname} " | awk '{print $2}') + gameserverpid=$(tmux list-sessions -F "#{session_name} #{pane_pid}" | grep "^${sessionname} " | awk '{print $NF}') fi ### Distro information