Просмотр исходного кода

feat(fctr): add function to get the server version via the details command (#3956)

Christian 3 лет назад
Родитель
Сommit
ff606a5968
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      lgsm/functions/info_game.sh

+ 6 - 0
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() {