From ff606a596899d4c4dfffbac5ab507b93b562bcd5 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 23 Aug 2022 21:33:08 +0200 Subject: [PATCH] feat(fctr): add function to get the server version via the details command (#3956) --- lgsm/functions/info_game.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 57d01237d..2d704a2ba 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -653,6 +653,12 @@ fn_info_game_fctr() { port=${port:-"0"} rconport=${rconport:-"0"} rconpassword=${rconpassword:-"NOT SET"} + + # get server version if installed + local factoriobin="${executabledir}${executable:1}" + if [ -f "${factoriobin}" ]; then + serverversion=$(${factoriobin} --version | grep "Version:" | awk '{print $2}') + fi } fn_info_game_jc2() {