Explorar o código

fix: awk to properly grab the server pid when spaces are present in the session name (#2997)

Ryan Walters %!s(int64=5) %!d(string=hai) anos
pai
achega
db4d3ccef4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lgsm/functions/info_distro.sh

+ 1 - 1
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