From 1c76695bb8368a3f078b40f2635cde868d7e3472 Mon Sep 17 00:00:00 2001 From: Stephan Schaffner Date: Fri, 23 Aug 2024 14:11:29 +0200 Subject: [PATCH 01/49] Adding default_cfg and Distro Requirements --- .../config-lgsm/xonoticserver/_default.cfg | 172 ++++++++++++++++++ lgsm/data/almalinux-8.csv | 1 + lgsm/data/almalinux-9.csv | 1 + lgsm/data/centos-7.csv | 1 + lgsm/data/centos-8.csv | 1 + lgsm/data/centos-9.csv | 1 + lgsm/data/debian-10.csv | 1 + lgsm/data/debian-11.csv | 1 + lgsm/data/debian-12.csv | 1 + lgsm/data/debian-13.csv | 1 + lgsm/data/debian-9.csv | 1 + lgsm/data/rhel-7.csv | 1 + lgsm/data/rhel-8.csv | 1 + lgsm/data/rhel-9.csv | 1 + lgsm/data/rocky-8.csv | 1 + lgsm/data/rocky-9.csv | 1 + lgsm/data/serverlist.csv | 1 + lgsm/data/ubuntu-16.04.csv | 1 + lgsm/data/ubuntu-18.04.csv | 1 + lgsm/data/ubuntu-20.04.csv | 1 + lgsm/data/ubuntu-22.04.csv | 1 + lgsm/data/ubuntu-23.04.csv | 1 + lgsm/data/ubuntu-23.10.csv | 1 + lgsm/data/ubuntu-24.04.csv | 1 + 24 files changed, 195 insertions(+) create mode 100644 lgsm/config-default/config-lgsm/xonoticserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/xonoticserver/_default.cfg b/lgsm/config-default/config-lgsm/xonoticserver/_default.cfg new file mode 100644 index 0000000000..7c1972ac0b --- /dev/null +++ b/lgsm/config-default/config-lgsm/xonoticserver/_default.cfg @@ -0,0 +1,172 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +# List of game types and mutators: https://docs.linuxgsm.com/game-servers/unreal-tournament-3 +startparameters="-userdir ${serverfiles}/${selfname}" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Alert on Start/Stop/Restart +statusalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" +curlcustomstring="" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="1" +querytype="" + +## Console type +consoleverbose="yes" +consoleinteract="no" + +## Game Server Details +# Do not edit +gamename="Unreal Tournament 3" +engine="unreal3" +glibc="2.3.2" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${systemdir}/Binaries" +executable="./ut3" +servercfgdir="${systemdir}/UTGame/Config/${selfname}" +servercfg="UTGame.ini" +servercfgdefault="UTGame.ini" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" +gamelogdir="${logdir}/server" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" +gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 2042421448..54a9d63e9f 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -134,5 +134,6 @@ wet wf wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb +xonotic zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 02f21426ca..23a0499c34 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -134,5 +134,6 @@ wet wf wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb +xonotic zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index a536c9c0f2..3b25ed5d8d 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -134,5 +134,6 @@ wet wf wmc,java-11-openjdk wurm,xorg-x11-server-Xvfb +xonotic zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index d4d008fd46..62c5d40cd2 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -134,5 +134,6 @@ wet wf wmc,java-17-openjdk wurm,xorg-x11-server-Xvfb +xonotic zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 574401733b..eb663440ad 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -134,5 +134,6 @@ wet wf wmc,java-17-openjdk wurm,xorg-x11-server-Xvfb +xonotic zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 6b1a843bbe..1fa551017d 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -134,5 +134,6 @@ wet wf wmc,openjdk-11-jre wurm,xvfb +xonotic zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 60a46f55db..57bff70ca3 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -134,5 +134,6 @@ wet wf wmc,openjdk-17-jre wurm,xvfb +xonotic zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 0fd50f2d7e..0dc4aa3f9b 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -134,5 +134,6 @@ wet wf wmc,openjdk-17-jre wurm,xvfb +xonotic zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/debian-13.csv b/lgsm/data/debian-13.csv index 6d16deb9f8..72fbbd7ec0 100644 --- a/lgsm/data/debian-13.csv +++ b/lgsm/data/debian-13.csv @@ -133,5 +133,6 @@ wet wf wmc,openjdk21-jre wurm,xvfb +xonotic zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 174bd8e165..ab798f4b33 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -134,5 +134,6 @@ wet wf wmc,openjdk-8-jre wurm,xvfb +xonotic zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 8854649adf..526c7d1153 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -134,5 +134,6 @@ wet wf wmc,java-11-openjdk wurm,xorg-x11-server-Xvfb +xonotic zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 7dd334f381..37bfdd980c 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -134,5 +134,6 @@ wet wf wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb +xonotic zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 02f21426ca..23a0499c34 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -134,5 +134,6 @@ wet wf wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb +xonotic zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 7dd334f381..37bfdd980c 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -134,5 +134,6 @@ wet wf wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb +xonotic zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 02f21426ca..23a0499c34 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -134,5 +134,6 @@ wet wf wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb +xonotic zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 7d21733211..e56043fb53 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -133,5 +133,6 @@ wet,wetserver,Wolfenstein: Enemy Territory,ubuntu-22.04 wf,wfserver,Warfork,ubuntu-22.04 wmc,wmcserver,WaterfallMC,ubuntu-22.04 wurm,wurmserver,Wurm Unlimited,ubuntu-22.04 +xonotic,Xonotic,ubuntu-22.04 zmr,zmrserver,Zombie Master: Reborn,ubuntu-22.04 zps,zpsserver,Zombie Panic! Source,ubuntu-22.04 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 1f359ab9d0..7bb2621fde 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -134,5 +134,6 @@ wet wf wmc,openjdk-8-jre wurm,xvfb +xonotic zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index cccd53dc71..632666d949 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -134,5 +134,6 @@ wet wf wmc,openjdk-11-jre wurm,xvfb +xonotic zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 4c0cae0a86..c48b0dee04 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -134,5 +134,6 @@ wet wf wmc,openjdk-21-jre wurm,xvfb +xonotic zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index b0f896fae8..68c48348b9 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -134,5 +134,6 @@ wet wf wmc,openjdk-21-jre wurm,xvfb +xonotic zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index 7ad90039b1..d31d7e07f0 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -134,5 +134,6 @@ wet wf wmc,openjdk-21-jre wurm,xvfb +xonotic zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-23.10.csv b/lgsm/data/ubuntu-23.10.csv index 7ad90039b1..d31d7e07f0 100644 --- a/lgsm/data/ubuntu-23.10.csv +++ b/lgsm/data/ubuntu-23.10.csv @@ -134,5 +134,6 @@ wet wf wmc,openjdk-21-jre wurm,xvfb +xonotic zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-24.04.csv b/lgsm/data/ubuntu-24.04.csv index 7ad90039b1..d31d7e07f0 100644 --- a/lgsm/data/ubuntu-24.04.csv +++ b/lgsm/data/ubuntu-24.04.csv @@ -134,5 +134,6 @@ wet wf wmc,openjdk-21-jre wurm,xvfb +xonotic zmr,libtinfo5:i386 zps,libtinfo5:i386 From 08b1b14f45be617fe6c417af041ec5e14009be14 Mon Sep 17 00:00:00 2001 From: Stephan Schaffner Date: Fri, 23 Aug 2024 14:41:54 +0200 Subject: [PATCH 02/49] Adding Shellscripts for Xonotic --- lgsm/modules/install_server_files.sh | 9 +++++++++ lgsm/modules/update_xonotic.sh | 14 ++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 lgsm/modules/update_xonotic.sh diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index 7ebac259f7..3e1004be5d 100644 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -197,6 +197,13 @@ fn_install_server_files() { chmodx="nochmodx" run="norun" force="noforce" md5="93705e165550c97484678236749198a4" + elif [ "${shortname}" == "xonotic" ]; then + remote_fileurl="https://dl.xonotic.org/xonotic-0.8.6.zip" + local_filedir="${tmpdir}" + local_filename="xonotic-0.8.6.zip" + chmodx="nochmodx" run="norun" + force="noforce" + md5="32cdf9f90930e4599177dafc41adda48" elif [ "${shortname}" == "zmr" ]; then remote_fileurl="http://linuxgsm.download/ZombieMasterReborn/zombie_master_reborn_b6_1.tar.xz" local_filedir="${tmpdir}" @@ -247,6 +254,8 @@ elif [ "${shortname}" == "vints" ]; then elif [ "${shortname}" == "ut99" ]; then fn_install_server_files update_ut99.sh +elif [ "${shortname}" == "xonotic" ]; then + update_xonotic.sh elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "q4" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then if [ "${shortname}" == "ut" ]; then install_eula.sh diff --git a/lgsm/modules/update_xonotic.sh b/lgsm/modules/update_xonotic.sh new file mode 100644 index 0000000000..2db7d5510c --- /dev/null +++ b/lgsm/modules/update_xonotic.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# LinuxGSM install_steamcmd.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Downloads SteamCMD on install. + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +echo -e "" +echo -e "${bold}${lightyellow}Installing Xonotic${default}" +fn_messages_separator +mkdir -p "${serverfiles}/${selfname}/data" +cp "${serverfiles}/server/server.cfg ${serverfiles}/${selfname}/data/server.cfg" From 9dec8c902e5028f89ea53d3460d49c7a515335dc Mon Sep 17 00:00:00 2001 From: Stephan Schaffner Date: Fri, 23 Aug 2024 15:05:02 +0200 Subject: [PATCH 03/49] Fixing serverlist.csv --- lgsm/data/serverlist.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index e56043fb53..90e4f5d556 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -133,6 +133,6 @@ wet,wetserver,Wolfenstein: Enemy Territory,ubuntu-22.04 wf,wfserver,Warfork,ubuntu-22.04 wmc,wmcserver,WaterfallMC,ubuntu-22.04 wurm,wurmserver,Wurm Unlimited,ubuntu-22.04 -xonotic,Xonotic,ubuntu-22.04 +xonotic,xonoticserver,Xonotic,ubuntu-22.04 zmr,zmrserver,Zombie Master: Reborn,ubuntu-22.04 zps,zpsserver,Zombie Panic! Source,ubuntu-22.04 From a2f3c78f1eab7ef2582682342ae04960fe11e45d Mon Sep 17 00:00:00 2001 From: Stephan Schaffner Date: Fri, 23 Aug 2024 15:08:10 +0200 Subject: [PATCH 04/49] Fixing again serverlist.csv --- lgsm/data/serverlist.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 90e4f5d556..f64db44344 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -133,6 +133,6 @@ wet,wetserver,Wolfenstein: Enemy Territory,ubuntu-22.04 wf,wfserver,Warfork,ubuntu-22.04 wmc,wmcserver,WaterfallMC,ubuntu-22.04 wurm,wurmserver,Wurm Unlimited,ubuntu-22.04 -xonotic,xonoticserver,Xonotic,ubuntu-22.04 +xonotic,xonoticerver,Xonotic,ubuntu-22.04 zmr,zmrserver,Zombie Master: Reborn,ubuntu-22.04 zps,zpsserver,Zombie Panic! Source,ubuntu-22.04 From c5144d5177811e976b90f7a7b242901911a4606e Mon Sep 17 00:00:00 2001 From: Stephan Schaffner Date: Fri, 23 Aug 2024 15:09:57 +0200 Subject: [PATCH 05/49] Fixed Typo --- lgsm/data/serverlist.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index f64db44344..90e4f5d556 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -133,6 +133,6 @@ wet,wetserver,Wolfenstein: Enemy Territory,ubuntu-22.04 wf,wfserver,Warfork,ubuntu-22.04 wmc,wmcserver,WaterfallMC,ubuntu-22.04 wurm,wurmserver,Wurm Unlimited,ubuntu-22.04 -xonotic,xonoticerver,Xonotic,ubuntu-22.04 +xonotic,xonoticserver,Xonotic,ubuntu-22.04 zmr,zmrserver,Zombie Master: Reborn,ubuntu-22.04 zps,zpsserver,Zombie Panic! Source,ubuntu-22.04 From 8ba43627f92c3067390e6e0f8713941118c3bdbd Mon Sep 17 00:00:00 2001 From: Stephan Schaffner Date: Fri, 23 Aug 2024 15:14:50 +0200 Subject: [PATCH 06/49] Changing Shortname to XNT --- lgsm/data/almalinux-8.csv | 2 +- lgsm/data/almalinux-9.csv | 2 +- lgsm/data/centos-7.csv | 2 +- lgsm/data/centos-8.csv | 2 +- lgsm/data/centos-9.csv | 2 +- lgsm/data/debian-10.csv | 2 +- lgsm/data/debian-11.csv | 2 +- lgsm/data/debian-12.csv | 2 +- lgsm/data/debian-13.csv | 2 +- lgsm/data/debian-9.csv | 2 +- lgsm/data/rhel-7.csv | 2 +- lgsm/data/rhel-8.csv | 2 +- lgsm/data/rhel-9.csv | 2 +- lgsm/data/rocky-8.csv | 2 +- lgsm/data/rocky-9.csv | 2 +- lgsm/data/serverlist.csv | 2 +- lgsm/data/ubuntu-16.04.csv | 2 +- lgsm/data/ubuntu-18.04.csv | 2 +- lgsm/data/ubuntu-20.04.csv | 2 +- lgsm/data/ubuntu-22.04.csv | 2 +- lgsm/data/ubuntu-23.04.csv | 2 +- lgsm/data/ubuntu-23.10.csv | 2 +- lgsm/data/ubuntu-24.04.csv | 2 +- lgsm/modules/install_server_files.sh | 6 +++--- 24 files changed, 26 insertions(+), 26 deletions(-) diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 54a9d63e9f..d4d2456bd0 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -134,6 +134,6 @@ wet wf wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb -xonotic +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 23a0499c34..7dae6338e5 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -134,6 +134,6 @@ wet wf wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb -xonotic +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 3b25ed5d8d..266b358bad 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -134,6 +134,6 @@ wet wf wmc,java-11-openjdk wurm,xorg-x11-server-Xvfb -xonotic +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 62c5d40cd2..bd5b72c33c 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -134,6 +134,6 @@ wet wf wmc,java-17-openjdk wurm,xorg-x11-server-Xvfb -xonotic +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index eb663440ad..893f3698c0 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -134,6 +134,6 @@ wet wf wmc,java-17-openjdk wurm,xorg-x11-server-Xvfb -xonotic +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 1fa551017d..6bfa1dae48 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -134,6 +134,6 @@ wet wf wmc,openjdk-11-jre wurm,xvfb -xonotic +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 57bff70ca3..5441a69b4b 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -134,6 +134,6 @@ wet wf wmc,openjdk-17-jre wurm,xvfb -xonotic +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 0dc4aa3f9b..1c0a39930d 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -134,6 +134,6 @@ wet wf wmc,openjdk-17-jre wurm,xvfb -xonotic +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/debian-13.csv b/lgsm/data/debian-13.csv index 72fbbd7ec0..af262abb69 100644 --- a/lgsm/data/debian-13.csv +++ b/lgsm/data/debian-13.csv @@ -133,6 +133,6 @@ wet wf wmc,openjdk21-jre wurm,xvfb -xonotic +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index ab798f4b33..4e54ac2414 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -134,6 +134,6 @@ wet wf wmc,openjdk-8-jre wurm,xvfb -xonotic +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 526c7d1153..7800136bb9 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -134,6 +134,6 @@ wet wf wmc,java-11-openjdk wurm,xorg-x11-server-Xvfb -xonotic +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 37bfdd980c..f8bb1d4921 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -134,6 +134,6 @@ wet wf wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb -xonotic +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 23a0499c34..7dae6338e5 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -134,6 +134,6 @@ wet wf wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb -xonotic +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 37bfdd980c..f8bb1d4921 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -134,6 +134,6 @@ wet wf wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb -xonotic +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 23a0499c34..7dae6338e5 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -134,6 +134,6 @@ wet wf wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb -xonotic +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 90e4f5d556..8b408f84f4 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -133,6 +133,6 @@ wet,wetserver,Wolfenstein: Enemy Territory,ubuntu-22.04 wf,wfserver,Warfork,ubuntu-22.04 wmc,wmcserver,WaterfallMC,ubuntu-22.04 wurm,wurmserver,Wurm Unlimited,ubuntu-22.04 -xonotic,xonoticserver,Xonotic,ubuntu-22.04 +xnt,xntserver,Xonotic,ubuntu-22.04 zmr,zmrserver,Zombie Master: Reborn,ubuntu-22.04 zps,zpsserver,Zombie Panic! Source,ubuntu-22.04 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 7bb2621fde..51f769c1af 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -134,6 +134,6 @@ wet wf wmc,openjdk-8-jre wurm,xvfb -xonotic +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 632666d949..7ca2d86c6a 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -134,6 +134,6 @@ wet wf wmc,openjdk-11-jre wurm,xvfb -xonotic +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index c48b0dee04..f16d8b3bec 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -134,6 +134,6 @@ wet wf wmc,openjdk-21-jre wurm,xvfb -xonotic +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 68c48348b9..e84f4ddddc 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -134,6 +134,6 @@ wet wf wmc,openjdk-21-jre wurm,xvfb -xonotic +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index d31d7e07f0..c0135abd73 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -134,6 +134,6 @@ wet wf wmc,openjdk-21-jre wurm,xvfb -xonotic +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-23.10.csv b/lgsm/data/ubuntu-23.10.csv index d31d7e07f0..c0135abd73 100644 --- a/lgsm/data/ubuntu-23.10.csv +++ b/lgsm/data/ubuntu-23.10.csv @@ -134,6 +134,6 @@ wet wf wmc,openjdk-21-jre wurm,xvfb -xonotic +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-24.04.csv b/lgsm/data/ubuntu-24.04.csv index d31d7e07f0..c0135abd73 100644 --- a/lgsm/data/ubuntu-24.04.csv +++ b/lgsm/data/ubuntu-24.04.csv @@ -134,6 +134,6 @@ wet wf wmc,openjdk-21-jre wurm,xvfb -xonotic +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index 3e1004be5d..41b1ea45fd 100644 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -197,7 +197,7 @@ fn_install_server_files() { chmodx="nochmodx" run="norun" force="noforce" md5="93705e165550c97484678236749198a4" - elif [ "${shortname}" == "xonotic" ]; then + elif [ "${shortname}" == "xnt" ]; then remote_fileurl="https://dl.xonotic.org/xonotic-0.8.6.zip" local_filedir="${tmpdir}" local_filename="xonotic-0.8.6.zip" @@ -254,8 +254,8 @@ elif [ "${shortname}" == "vints" ]; then elif [ "${shortname}" == "ut99" ]; then fn_install_server_files update_ut99.sh -elif [ "${shortname}" == "xonotic" ]; then - update_xonotic.sh +elif [ "${shortname}" == "xnt" ]; then + update_xnt.sh elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "q4" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then if [ "${shortname}" == "ut" ]; then install_eula.sh From d48e1bbb8d0a18670ac6dfae8dc3ca098f9325f5 Mon Sep 17 00:00:00 2001 From: Stephan Schaffner Date: Fri, 23 Aug 2024 15:16:33 +0200 Subject: [PATCH 07/49] Fixing missed _default.cfg change --- .../config-lgsm/{xonoticserver => xntserver}/_default.cfg | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lgsm/config-default/config-lgsm/{xonoticserver => xntserver}/_default.cfg (100%) diff --git a/lgsm/config-default/config-lgsm/xonoticserver/_default.cfg b/lgsm/config-default/config-lgsm/xntserver/_default.cfg similarity index 100% rename from lgsm/config-default/config-lgsm/xonoticserver/_default.cfg rename to lgsm/config-default/config-lgsm/xntserver/_default.cfg From 028155f840a1470f0e0b90af6fcee5a631e43ad8 Mon Sep 17 00:00:00 2001 From: Stephan Schaffner Date: Fri, 23 Aug 2024 15:36:14 +0200 Subject: [PATCH 08/49] Fixing _default.cfg --- .../config-lgsm/xntserver/_default.cfg | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lgsm/config-default/config-lgsm/xntserver/_default.cfg b/lgsm/config-default/config-lgsm/xntserver/_default.cfg index 7c1972ac0b..212c3d597a 100644 --- a/lgsm/config-default/config-lgsm/xntserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/xntserver/_default.cfg @@ -132,8 +132,8 @@ consoleinteract="no" ## Game Server Details # Do not edit -gamename="Unreal Tournament 3" -engine="unreal3" +gamename="Xonotic" +engine="unreal3darkplaces" glibc="2.3.2" #### Directories #### @@ -141,12 +141,10 @@ glibc="2.3.2" ## Game Server Directories systemdir="${serverfiles}" -executabledir="${systemdir}/Binaries" -executable="./ut3" -servercfgdir="${systemdir}/UTGame/Config/${selfname}" -servercfg="UTGame.ini" -servercfgdefault="UTGame.ini" -servercfgfullpath="${servercfgdir}/${servercfg}" +executabledir="${serverfiles}" +executable="./xonotic-linux64-dedicated" +servercfgdir="${serverfiles}/${selfname}" +servercfg="server.cfg" ## Backup Directory backupdir="${lgsmdir}/backup" From f0a7076bae4a80bb55fce53015490d2356d66ecd Mon Sep 17 00:00:00 2001 From: Stephan Schaffner Date: Fri, 23 Aug 2024 15:51:55 +0200 Subject: [PATCH 09/49] Updating Modules and Server installation --- lgsm/modules/install_server_files.sh | 1 + lgsm/modules/{update_xonotic.sh => update_xnt.sh} | 0 2 files changed, 1 insertion(+) rename lgsm/modules/{update_xonotic.sh => update_xnt.sh} (100%) diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index 41b1ea45fd..5401c9324c 100644 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -255,6 +255,7 @@ elif [ "${shortname}" == "ut99" ]; then fn_install_server_files update_ut99.sh elif [ "${shortname}" == "xnt" ]; then + fn_install_server_files update_xnt.sh elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "q4" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then if [ "${shortname}" == "ut" ]; then diff --git a/lgsm/modules/update_xonotic.sh b/lgsm/modules/update_xnt.sh similarity index 100% rename from lgsm/modules/update_xonotic.sh rename to lgsm/modules/update_xnt.sh From c55bd13ea5716e966da829d9de02cf378a0c2d98 Mon Sep 17 00:00:00 2001 From: Stephan Schaffner Date: Fri, 23 Aug 2024 16:00:55 +0200 Subject: [PATCH 10/49] Updating paths and install script --- lgsm/config-default/config-lgsm/xntserver/_default.cfg | 8 ++++---- lgsm/modules/install_server_files.sh | 2 +- lgsm/modules/update_xnt.sh | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lgsm/config-default/config-lgsm/xntserver/_default.cfg b/lgsm/config-default/config-lgsm/xntserver/_default.cfg index 212c3d597a..997b620e98 100644 --- a/lgsm/config-default/config-lgsm/xntserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/xntserver/_default.cfg @@ -12,7 +12,7 @@ ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # List of game types and mutators: https://docs.linuxgsm.com/game-servers/unreal-tournament-3 -startparameters="-userdir ${serverfiles}/${selfname}" +startparameters="-userdir ${serverfiles}/Xonotic/${selfname}" #### LinuxGSM Settings #### @@ -140,10 +140,10 @@ glibc="2.3.2" # Edit with care ## Game Server Directories -systemdir="${serverfiles}" -executabledir="${serverfiles}" +systemdir="${serverfiles}/Xonotic/" +executabledir="${serverfiles}/Xonotic/" executable="./xonotic-linux64-dedicated" -servercfgdir="${serverfiles}/${selfname}" +servercfgdir="${serverfiles}/Xonotic/${selfname}" servercfg="server.cfg" ## Backup Directory diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index 5401c9324c..d4a204ce8c 100644 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -256,7 +256,7 @@ elif [ "${shortname}" == "ut99" ]; then update_ut99.sh elif [ "${shortname}" == "xnt" ]; then fn_install_server_files - update_xnt.sh + bash update_xnt.sh elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "q4" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then if [ "${shortname}" == "ut" ]; then install_eula.sh diff --git a/lgsm/modules/update_xnt.sh b/lgsm/modules/update_xnt.sh index 2db7d5510c..d795bb4a40 100644 --- a/lgsm/modules/update_xnt.sh +++ b/lgsm/modules/update_xnt.sh @@ -1,14 +1,14 @@ #!/bin/bash -# LinuxGSM install_steamcmd.sh module +# LinuxGSM update_xnt module # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Downloads SteamCMD on install. +# Description: Install Xonotic Default Config moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${bold}${lightyellow}Installing Xonotic${default}" fn_messages_separator -mkdir -p "${serverfiles}/${selfname}/data" -cp "${serverfiles}/server/server.cfg ${serverfiles}/${selfname}/data/server.cfg" +mkdir -p "${serverfiles}/Xonotic/${selfname}/data" +cp "${serverfiles}/Xonotic/server/server.cfg ${serverfiles}/Xonotic/${selfname}/data/server.cfg" From 69369dc426ba3d6b896837131cd7f1d8990827e3 Mon Sep 17 00:00:00 2001 From: Stephan Schaffner Date: Fri, 23 Aug 2024 16:07:33 +0200 Subject: [PATCH 11/49] Fixing install Scripts Issues --- lgsm/modules/command_install.sh | 2 ++ lgsm/modules/install_server_files.sh | 1 - lgsm/modules/{update_xnt.sh => install_xnt.sh} | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) rename lgsm/modules/{update_xnt.sh => install_xnt.sh} (93%) diff --git a/lgsm/modules/command_install.sh b/lgsm/modules/command_install.sh index c3bf27c614..a5082110fc 100644 --- a/lgsm/modules/command_install.sh +++ b/lgsm/modules/command_install.sh @@ -46,6 +46,8 @@ else elif [ "${shortname}" == "mta" ]; then command_install_resources_mta.sh fn_firstcommand_reset + elif [ "${shortname}" == "xnt" ]; then + install_xnt.sh fi fix.sh diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index d4a204ce8c..5e36e1017f 100644 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -256,7 +256,6 @@ elif [ "${shortname}" == "ut99" ]; then update_ut99.sh elif [ "${shortname}" == "xnt" ]; then fn_install_server_files - bash update_xnt.sh elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "q4" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then if [ "${shortname}" == "ut" ]; then install_eula.sh diff --git a/lgsm/modules/update_xnt.sh b/lgsm/modules/install_xnt.sh similarity index 93% rename from lgsm/modules/update_xnt.sh rename to lgsm/modules/install_xnt.sh index d795bb4a40..bc7ce219dd 100644 --- a/lgsm/modules/update_xnt.sh +++ b/lgsm/modules/install_xnt.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LinuxGSM update_xnt module +# LinuxGSM install_xnt module # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com From c13c188f301200af44b7a5abd5f0c4ceb943591f Mon Sep 17 00:00:00 2001 From: Stephan Schaffner Date: Fri, 23 Aug 2024 16:29:58 +0200 Subject: [PATCH 12/49] Update info_game.sh --- lgsm/modules/info_game.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 0f38ea2500..7026491e44 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2242,6 +2242,16 @@ fn_info_game_wf() { servername="${servername:-"NOT SET"}" } +# Config Type: Xonotic +# Comment: // +# Filetype: cfg +fn_info_game_xnt() { + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + adminpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" +} + fn_info_game_wmc() { if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -2476,6 +2486,8 @@ elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsrc" ]; then fn_info_game_source elif [ "${engine}" == "unreal2" ]; then fn_info_game_unreal2 +elif [ "${shortname}" == "xnt" ]; then + fn_info_game_xnt fi # Public IP address From 51ab8047fd2ee2a8762b35ae3661abff28826e34 Mon Sep 17 00:00:00 2001 From: Stephan Schaffner Date: Fri, 23 Aug 2024 16:43:15 +0200 Subject: [PATCH 13/49] Updating Game Info Curling --- lgsm/modules/info_game.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 7026491e44..b590960a55 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2246,10 +2246,17 @@ fn_info_game_wf() { # Comment: // # Filetype: cfg fn_info_game_xnt() { - maxplayers="${maxplayers:-"0"}" - port="${port:-"0"}" + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "adminpassword" "rconpassword" + fn_info_game_ini "port" "port" + fn_info_game_ini "servername" "hostname" + fn_info_game_ini "maxplayers" "maxplayers" + else + maxplayers="${maxplayers:-"8"}" + port="${port:-"2600"}" adminpassword="${rconpassword:-"NOT SET"}" servername="${servername:-"NOT SET"}" + fi } fn_info_game_wmc() { From 93d4b2690b3c9737543b021e9d617a88a3b33223 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 27 Aug 2024 22:43:29 +0100 Subject: [PATCH 14/49] fix bug with npm download of gamedig on branches --- lgsm/modules/check_gamedig.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/check_gamedig.sh b/lgsm/modules/check_gamedig.sh index 8abc0b759d..61149d5671 100644 --- a/lgsm/modules/check_gamedig.sh +++ b/lgsm/modules/check_gamedig.sh @@ -10,10 +10,10 @@ if [ "$(command -v node)" ] && [ "$(node -v | cut -d 'v' -f 2 | cut -d '.' -f 1) echo -e "${bold}${lightyellow}Installing Gamedig${default}" fn_script_log_info "Installing Gamedig" cd "${lgsmdir}" || exit - curl -L -o package.json "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${githubbranch}/package.json" + curl -L -o package.json "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/package.json" npm install elif [ "$(command -v node)" ] && [ "$(node -v | cut -d 'v' -f 2 | cut -d '.' -f 1)" -ge 16 ]; then cd "${lgsmdir}" || exit - curl -s -L -o package.json "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${githubbranch}/package.json" + curl -s -L -o package.json "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/package.json" npm update > /dev/null 2>&1 fi From 6e2766c4bfe39623c3daaee91ff58b69590b7ba0 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 27 Aug 2024 22:53:18 +0100 Subject: [PATCH 15/49] styling fix --- lgsm/modules/install_server_files.sh | 87 ++++++++++++++++++---------- 1 file changed, 58 insertions(+), 29 deletions(-) diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index 5e36e1017f..2a87adb863 100644 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -12,203 +12,232 @@ fn_install_server_files() { remote_fileurl="http://linuxgsm.download/ActionHalfLife/action_halflife-1.0.tar.xz" local_filedir="${tmpdir}" local_filename="action_halflife-1.0.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="61d7b79fd714888b6d65944fdaafa94a" elif [ "${shortname}" == "bf1942" ]; then remote_fileurl="http://linuxgsm.download/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.xz" local_filedir="${tmpdir}" local_filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="4223bf4ed85f5162c24b2cba51249b9e" elif [ "${shortname}" == "bfv" ]; then remote_fileurl="http://linuxgsm.download/BattlefieldVietnam/bfv_linded-v1.21-20041207_patch.tar.xz" local_filedir="${tmpdir}" local_filename="bfv_linded-v1.21-20041207_patch.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="e3b4962cdd9d41e23c6fed65101bccde" elif [ "${shortname}" == "bb" ]; then remote_fileurl="http://linuxgsm.download/BrainBread/brainbread-v1.2-linuxserver.tar.xz" local_filedir="${tmpdir}" local_filename="brainbread-v1.2-linuxserver.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="55f227183b736397806d5b6db6143f15" elif [ "${shortname}" == "cod" ]; then remote_fileurl="http://linuxgsm.download/CallOfDuty/cod-lnxded-1.5b-full.tar.xz" local_filedir="${tmpdir}" local_filename="cod-lnxded-1.5-large.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="ee0ad1ccbfa1fd27fde01a4a431a5c2f" elif [ "${shortname}" == "coduo" ]; then remote_fileurl="http://linuxgsm.download/CallOfDutyUnitedOffensive/coduo-lnxded-1.51b-full.tar.xz" local_filedir="${tmpdir}" local_filename="coduo-lnxded-1.51b-full.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="35cabccd67adcda44aaebc59405915b9" elif [ "${shortname}" == "cod2" ]; then remote_fileurl="http://linuxgsm.download/CallOfDuty2/cod2-lnxded-1.3-full.tar.xz" local_filedir="${tmpdir}" local_filename="cod2-lnxded-1.3-full.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="b8c4c611f01627dd43348e78478a3d41" elif [ "${shortname}" == "cod4" ]; then remote_fileurl="http://linuxgsm.download/CallOfDuty4/cod4x18_lnxded.tar.xz" local_filedir="${tmpdir}" local_filename="cod4x18_lnxded.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="d255b59b9756d7dbead67718208512ee" elif [ "${shortname}" == "codwaw" ]; then remote_fileurl="http://linuxgsm.download/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.xz" local_filedir="${tmpdir}" local_filename="codwaw-lnxded-1.7-full.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="2c6be1bb66ea631b9b2e7ae6216c6680" elif [ "${shortname}" == "etl" ]; then remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/etlegacy-v2.78.1-i386-et-260b.tar.xz" local_filedir="${tmpdir}" local_filename="etlegacy-v2.78.1-i386-et-260b.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="7c08b52cb09b30eadb98ea05ef780fc7" elif [ "${shortname}" == "mohaa" ]; then remote_fileurl="http://linuxgsm.download/MedalofHonorAlliedAssault/moh_revival_v1.12_RC3.5.1.tar.xz" local_filedir="${tmpdir}" local_filename="moh_revival_v1.12_RC3.5.1.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="7c664538999252eeaf2b6d9949416480" elif [ "${shortname}" == "ns" ]; then remote_fileurl="http://linuxgsm.download/NaturalSelection/ns_dedicated_server_v32.tar.xz" local_filedir="${tmpdir}" local_filename="ns_dedicated_server_v32.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="23ec3cadd93d8bb1c475bad5b9cce370" elif [ "${shortname}" == "q2" ]; then remote_fileurl="http://linuxgsm.download/Quake2/quake2-3.20-glibc-i386-full-linux2.0.tar.xz" local_filedir="${tmpdir}" local_filename="quake2-3.20-glibc-i386-full-linux2.0.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="2908164a32d4808bb720f2161f6b0c82" elif [ "${shortname}" == "q3" ]; then remote_fileurl="http://linuxgsm.download/Quake3/quake3-1.32c-x86-full-linux.tar.xz" local_filedir="${tmpdir}" local_filename="quake3-1.32c-x86-full-linux.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="b0e26d8919fe9313fb9d8ded2360f3db" elif [ "${shortname}" == "q4" ]; then remote_fileurl="http://linuxgsm.download/Quake4/quake4-1.4.2-x86-linuxded.tar.xz" local_filedir="${tmpdir}" local_filename="quake4-1.4.2-x86-linuxded.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="afe30b44f23c8ae2ce6f0f464473d8ba" elif [ "${shortname}" == "qw" ]; then remote_fileurl="http://linuxgsm.download/QuakeWorld/nquake.server.linux.190506.full.tar.xz" local_filedir="${tmpdir}" local_filename="nquake.server.linux.190506.full.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="82055b7d973206c13a606db8ba288d03" elif [ "${shortname}" == "rtcw" ]; then remote_fileurl="http://linuxgsm.download/ReturnToCastleWolfenstein/iortcw-1.51c-x86_64-server-linux-20190507.tar.xz" local_filedir="${tmpdir}" local_filename="iortcw-1.51c-x86_64-server-linux-20190507.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="df6ff664d37dd0d22787848bdb3cac5f" elif [ "${shortname}" == "sfc" ]; then remote_fileurl="http://linuxgsm.download/SourceFortsClassic/SFClassic-1.0-RC7-fix.tar.xz" local_filedir="${tmpdir}" local_filename="SFClassic-1.0-RC7-fix.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="70077137185700e28fe6bbb6021d12bc" elif [ "${shortname}" == "sof2" ]; then remote_fileurl="http://linuxgsm.download/SoldierOfFortune2/sof2gold-1.03.tar.xz" local_filedir="${tmpdir}" local_filename="sof2gold-1.03.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="201e23bab04207d00ce813d001c483d9" elif [ "${shortname}" == "ts" ]; then remote_fileurl="http://linuxgsm.download/TheSpecialists/ts-3-linux-final.tar.xz" local_filedir="${tmpdir}" local_filename="ts-3-linux-final.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="3c66ecff6e3644f7ac88015732a0fb93" elif [ "${shortname}" == "ut2k4" ]; then remote_fileurl="http://linuxgsm.download/UnrealTournament2004/ut2004-server-3369-3-ultimate-linux.tar.xz" local_filedir="${tmpdir}" local_filename="ut2004-server-3369-3-ultimate-linux.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="9fceaab68554749f4b45be66613b9a15" elif [ "${shortname}" == "ut99" ]; then remote_fileurl="http://linuxgsm.download/UnrealTournament99/ut99-server-469b-ultimate-linux.tar.xz" local_filedir="${tmpdir}" local_filename="ut99-server-469b-ultimate-linux.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="dba3f1122a5e60ee45ece7422fcf78f5" elif [ "${shortname}" == "ut" ]; then remote_fileurl="http://linuxgsm.download/UnrealTournament/UnrealTournament-Server-XAN-3525360-Linux.tar.xz" local_filedir="${tmpdir}" local_filename="UnrealTournament-Server-XAN-3525360-Linux.tar.xz" - chmodx="noexecute" run="norun" + chmodx="noexecute" + run="norun" force="noforce" md5="41dd92015713a78211eaccf503b72393" elif [ "${shortname}" == "ut3" ]; then remote_fileurl="http://linuxgsm.download/UnrealTournament3/UT3-linux-server-2.1.tar.xz" local_filedir="${tmpdir}" local_filename="UT3-linux-server-2.1.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="8876cca61e3f83ea08db25208bde6ac6" elif [ "${shortname}" == "vs" ]; then remote_fileurl="http://linuxgsm.download/VampireSlayer/vs_l-6.0_full.tar.xz" local_filedir="${tmpdir}" local_filename="vs_l-6.0_full.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="b322f79e0abd31847493c52acf802667" elif [ "${shortname}" == "wet" ]; then remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/enemy-territory.260b.tar.xz" local_filedir="${tmpdir}" local_filename="enemy-territory.260b.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="581a333cc7eacda2f56d5a00fe11eafa" elif [ "${shortname}" == "samp" ]; then remote_fileurl="https://files.samp-sc.com/samp037svr_R2-1.tar.gz" local_filedir="${tmpdir}" local_filename="samp037svr_R2-1.tar.gz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="93705e165550c97484678236749198a4" elif [ "${shortname}" == "xnt" ]; then remote_fileurl="https://dl.xonotic.org/xonotic-0.8.6.zip" local_filedir="${tmpdir}" local_filename="xonotic-0.8.6.zip" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="32cdf9f90930e4599177dafc41adda48" elif [ "${shortname}" == "zmr" ]; then remote_fileurl="http://linuxgsm.download/ZombieMasterReborn/zombie_master_reborn_b6_1.tar.xz" local_filedir="${tmpdir}" local_filename="zombie_master_reborn_b6_1.tar.xz" - chmodx="nochmodx" run="norun" + chmodx="nochmodx" + run="norun" force="noforce" md5="0188ae86dbc9376f11ae3032dba2d665" else From a572c21fed50299e5b5842a73559caf19b2be56f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 27 Aug 2024 23:02:49 +0100 Subject: [PATCH 16/49] move to fix --- lgsm/modules/command_install.sh | 2 -- lgsm/modules/core_modules.sh | 5 +++++ lgsm/modules/fix.sh | 2 +- lgsm/modules/fix_xnt.sh | 18 ++++++++++++++++++ lgsm/modules/install_xnt.sh | 14 -------------- 5 files changed, 24 insertions(+), 17 deletions(-) create mode 100644 lgsm/modules/fix_xnt.sh delete mode 100644 lgsm/modules/install_xnt.sh diff --git a/lgsm/modules/command_install.sh b/lgsm/modules/command_install.sh index a5082110fc..c3bf27c614 100644 --- a/lgsm/modules/command_install.sh +++ b/lgsm/modules/command_install.sh @@ -46,8 +46,6 @@ else elif [ "${shortname}" == "mta" ]; then command_install_resources_mta.sh fn_firstcommand_reset - elif [ "${shortname}" == "xnt" ]; then - install_xnt.sh fi fix.sh diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 3cf0cd8e66..322fa82471 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -531,6 +531,11 @@ fix_wurm.sh() { fn_fetch_module } +fix_xmt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + fix_zmr.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module diff --git a/lgsm/modules/fix.sh b/lgsm/modules/fix.sh index e6e00465d8..6335659f16 100644 --- a/lgsm/modules/fix.sh +++ b/lgsm/modules/fix.sh @@ -52,7 +52,7 @@ fn_apply_fix() { fi } -apply_pre_start_fix=(arma3 armar ark av bt bo csgo cmw dst hw ins kf nmrih onset pvr ro rust rw samp sdtd sfc sm sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm zmr) +apply_pre_start_fix=(arma3 armar ark av bt bo csgo cmw dst hw ins kf nmrih onset pvr ro rust rw samp sdtd sfc sm sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm xnt zmr) apply_post_install_fix=(av kf kf2 ro ut2k4 ut ut3) # validate registered fixes for safe development diff --git a/lgsm/modules/fix_xnt.sh b/lgsm/modules/fix_xnt.sh new file mode 100644 index 0000000000..f8388b0de7 --- /dev/null +++ b/lgsm/modules/fix_xnt.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# LinuxGSM fix_xnt.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Install Xonotic Default Config + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Create the directory if it doesn't exist +if [ ! -d "${serverfiles}/Xonotic/${selfname}/data" ]; then + mkdir -p "${serverfiles}/Xonotic/${selfname}/data" +fi + +# Copy the server.cfg file if it exists +if [ -f "${serverfiles}/Xonotic/server/server.cfg" ]; then + cp "${serverfiles}/Xonotic/server/server.cfg" "${serverfiles}/Xonotic/${selfname}/data/server.cfg" +fi diff --git a/lgsm/modules/install_xnt.sh b/lgsm/modules/install_xnt.sh deleted file mode 100644 index bc7ce219dd..0000000000 --- a/lgsm/modules/install_xnt.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -# LinuxGSM install_xnt module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Install Xonotic Default Config - -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -echo -e "" -echo -e "${bold}${lightyellow}Installing Xonotic${default}" -fn_messages_separator -mkdir -p "${serverfiles}/Xonotic/${selfname}/data" -cp "${serverfiles}/Xonotic/server/server.cfg ${serverfiles}/Xonotic/${selfname}/data/server.cfg" From 3fd7fbcfc9b1f9d24fb5e968998e883efcb68503 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 27 Aug 2024 23:08:39 +0100 Subject: [PATCH 17/49] typo --- lgsm/modules/core_modules.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 322fa82471..2d9906de49 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -531,7 +531,7 @@ fix_wurm.sh() { fn_fetch_module } -fix_xmt.sh() { +fix_xnt.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } From 6d61be9d199880195d6954a16cf12e1d1ad04a63 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 27 Aug 2024 23:10:39 +0100 Subject: [PATCH 18/49] bug --- lgsm/modules/fix_xnt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/fix_xnt.sh b/lgsm/modules/fix_xnt.sh index f8388b0de7..198b1ca995 100644 --- a/lgsm/modules/fix_xnt.sh +++ b/lgsm/modules/fix_xnt.sh @@ -13,6 +13,6 @@ if [ ! -d "${serverfiles}/Xonotic/${selfname}/data" ]; then fi # Copy the server.cfg file if it exists -if [ -f "${serverfiles}/Xonotic/server/server.cfg" ]; then +if [ -f "${serverfiles}/Xonotic/${selfname}/data/server.cfg" ]; then cp "${serverfiles}/Xonotic/server/server.cfg" "${serverfiles}/Xonotic/${selfname}/data/server.cfg" fi From 663536ae0cca1ca4615ffacc19ec14bf25ced1c7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 27 Aug 2024 23:15:05 +0100 Subject: [PATCH 19/49] add missing details --- lgsm/modules/info_messages.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 9bab0cbb72..8f28cacabf 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -1548,6 +1548,14 @@ fn_info_messages_st() { } | column -s $'\t' -t } +fn_info_messages_stn() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + fn_info_messages_ti() { { fn_port "header" @@ -1728,7 +1736,7 @@ fn_info_messages_wurm() { } | column -s $'\t' -t } -fn_info_messages_stn() { +fn_info_messages_xnt() { { fn_port "header" fn_port "Game" port udp @@ -1914,6 +1922,8 @@ fn_info_messages_select_engine() { fn_info_messages_wf elif [ "${shortname}" == "wurm" ]; then fn_info_messages_wurm + elif [ "${shortname}" == "xnt" ]; then + fn_info_messages_xnt elif [ "${engine}" == "goldsrc" ]; then fn_info_messages_goldsrc elif [ "${engine}" == "prism3d" ]; then From 432f08a7b11c4c813b0f1fd4c78a785eec76cf57 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 27 Aug 2024 23:17:11 +0100 Subject: [PATCH 20/49] edit using config --- lgsm/modules/info_game.sh | 9 +++++---- lgsm/modules/info_messages.sh | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index b590960a55..f3ee70fcb7 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2249,13 +2249,14 @@ fn_info_game_xnt() { if [ -f "${servercfgfullpath}" ]; then fn_info_game_ini "adminpassword" "rconpassword" fn_info_game_ini "port" "port" + fn_info_game_ini "queryport" "queryport" fn_info_game_ini "servername" "hostname" fn_info_game_ini "maxplayers" "maxplayers" else - maxplayers="${maxplayers:-"8"}" - port="${port:-"2600"}" - adminpassword="${rconpassword:-"NOT SET"}" - servername="${servername:-"NOT SET"}" + maxplayers="${maxplayers:-"8"}" + port="${port:-"2600"}" + adminpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" fi } diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 8f28cacabf..0bc444e5e3 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -668,7 +668,7 @@ fn_info_messages_ports_edit() { startparameterslocation="${red}UNKNOWN${default}" # engines/games that require editing in the config file. - local ports_edit_array=("ac" "arma3" "armar" "bo" "bt" "ct" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "nec" "pc" "pc2" "prism3d" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") + local ports_edit_array=("ac" "arma3" "armar" "bo" "bt" "ct" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "nec" "pc" "pc2" "prism3d" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "xnt" "wurm") for port_edit in "${ports_edit_array[@]}"; do if [ "${shortname}" == "ut3" ]; then startparameterslocation="${servercfgdir}/UTWeb.ini" From b003d49829ac1a1842370a575026291a2e79e263 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 27 Aug 2024 23:18:53 +0100 Subject: [PATCH 21/49] add missing servercfgfullpath --- lgsm/config-default/config-lgsm/xntserver/_default.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/config-default/config-lgsm/xntserver/_default.cfg b/lgsm/config-default/config-lgsm/xntserver/_default.cfg index 997b620e98..bf0722f728 100644 --- a/lgsm/config-default/config-lgsm/xntserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/xntserver/_default.cfg @@ -145,6 +145,7 @@ executabledir="${serverfiles}/Xonotic/" executable="./xonotic-linux64-dedicated" servercfgdir="${serverfiles}/Xonotic/${selfname}" servercfg="server.cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory backupdir="${lgsmdir}/backup" From 1024bf8a9fcc1585a7c0c671ae9f1b66cac11b1d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 27 Aug 2024 23:20:22 +0100 Subject: [PATCH 22/49] bug --- lgsm/modules/fix_xnt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/fix_xnt.sh b/lgsm/modules/fix_xnt.sh index 198b1ca995..97eefa3625 100644 --- a/lgsm/modules/fix_xnt.sh +++ b/lgsm/modules/fix_xnt.sh @@ -13,6 +13,6 @@ if [ ! -d "${serverfiles}/Xonotic/${selfname}/data" ]; then fi # Copy the server.cfg file if it exists -if [ -f "${serverfiles}/Xonotic/${selfname}/data/server.cfg" ]; then +if [ ! -f "${serverfiles}/Xonotic/${selfname}/data/server.cfg" ]; then cp "${serverfiles}/Xonotic/server/server.cfg" "${serverfiles}/Xonotic/${selfname}/data/server.cfg" fi From 16f12ff1f5076aaa07d7ee8fdea7ae5d9d925206 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 27 Aug 2024 23:28:35 +0100 Subject: [PATCH 23/49] config settings update --- lgsm/config-default/config-lgsm/xntserver/_default.cfg | 5 +++-- lgsm/modules/fix_xnt.sh | 5 ----- lgsm/modules/install_config.sh | 10 +++++++++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lgsm/config-default/config-lgsm/xntserver/_default.cfg b/lgsm/config-default/config-lgsm/xntserver/_default.cfg index bf0722f728..44036ec5b5 100644 --- a/lgsm/config-default/config-lgsm/xntserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/xntserver/_default.cfg @@ -141,10 +141,11 @@ glibc="2.3.2" ## Game Server Directories systemdir="${serverfiles}/Xonotic/" -executabledir="${serverfiles}/Xonotic/" +executabledir="${systemdir}" executable="./xonotic-linux64-dedicated" -servercfgdir="${serverfiles}/Xonotic/${selfname}" +servercfgdir="${systemdir}/${selfname}" servercfg="server.cfg" +servercfgdefault="${systemdir}/server/server.cfg" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory diff --git a/lgsm/modules/fix_xnt.sh b/lgsm/modules/fix_xnt.sh index 97eefa3625..7a3126e311 100644 --- a/lgsm/modules/fix_xnt.sh +++ b/lgsm/modules/fix_xnt.sh @@ -11,8 +11,3 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ ! -d "${serverfiles}/Xonotic/${selfname}/data" ]; then mkdir -p "${serverfiles}/Xonotic/${selfname}/data" fi - -# Copy the server.cfg file if it exists -if [ ! -f "${serverfiles}/Xonotic/${selfname}/data/server.cfg" ]; then - cp "${serverfiles}/Xonotic/server/server.cfg" "${serverfiles}/Xonotic/${selfname}/data/server.cfg" -fi diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 22843c7b02..582862e261 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -62,6 +62,12 @@ fn_default_config_local() { fn_messages_separator echo -e "Copying default configs." fn_check_cfgdir + + # Check if the directory for ${servercfgfullpath} exists, if not, create it + if [ ! -d "${servercfgfullpath}" ]; then + mkdir -p "${servercfgfullpath}" + fi + echo -en "copying config file [ ${italic}${servercfgdefault}${default} ]" cp -n "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}" if [ "${exitcode}" != 0 ]; then @@ -72,7 +78,6 @@ fn_default_config_local() { fn_script_log_pass "copying config file [ ${servercfgdefault} ]" fi } - # Changes some variables within the default configs. # SERVERNAME to LinuxGSM # PASSWORD to random password @@ -835,6 +840,9 @@ elif [ "${shortname}" == "wmc" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars +elif [ "${shortname}" == "xnt" ]; then + fn_default_config_local + fn_list_config_locations elif [ "${shortname}" == "wurm" ]; then array_configs+=(server.cfg) fn_fetch_default_config From 29a8eb04859d241a8bb8f25079217fe3b22af8a8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 27 Aug 2024 23:33:06 +0100 Subject: [PATCH 24/49] update cp command based off warn message --- lgsm/config-default/config-lgsm/xntserver/_default.cfg | 2 +- lgsm/modules/install_config.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/config-default/config-lgsm/xntserver/_default.cfg b/lgsm/config-default/config-lgsm/xntserver/_default.cfg index 44036ec5b5..c81db29cfe 100644 --- a/lgsm/config-default/config-lgsm/xntserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/xntserver/_default.cfg @@ -140,7 +140,7 @@ glibc="2.3.2" # Edit with care ## Game Server Directories -systemdir="${serverfiles}/Xonotic/" +systemdir="${serverfiles}/Xonotic" executabledir="${systemdir}" executable="./xonotic-linux64-dedicated" servercfgdir="${systemdir}/${selfname}" diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 582862e261..06157a809a 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -41,15 +41,15 @@ fn_default_config_remote() { fn_script_log_info "Copying ${servercfg} config file." if [ "${config}" == "${servercfgdefault}" ]; then mkdir -p "${servercfgdir}" - cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgfullpath}" + cp -v --update=none "${lgsmdir}/config-default/config-game/${config}" "${servercfgfullpath}" elif [ "${shortname}" == "arma3" ] && [ "${config}" == "${networkcfgdefault}" ]; then mkdir -p "${servercfgdir}" - cp -nv "${lgsmdir}/config-default/config-game/${config}" "${networkcfgfullpath}" + cp -v --update=none "${lgsmdir}/config-default/config-game/${config}" "${networkcfgfullpath}" elif [ "${shortname}" == "dst" ] && [ "${config}" == "${clustercfgdefault}" ]; then - cp -nv "${lgsmdir}/config-default/config-game/${clustercfgdefault}" "${clustercfgfullpath}" + cp -v --update=none "${lgsmdir}/config-default/config-game/${clustercfgdefault}" "${clustercfgfullpath}" else mkdir -p "${servercfgdir}" - cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgdir}/${config}" + cp -v --update=none "${lgsmdir}/config-default/config-game/${config}" "${servercfgdir}/${config}" fi done fn_sleep_time @@ -69,7 +69,7 @@ fn_default_config_local() { fi echo -en "copying config file [ ${italic}${servercfgdefault}${default} ]" - cp -n "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}" + cp -v --update=none "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}" if [ "${exitcode}" != 0 ]; then fn_print_fail_eol fn_script_log_fail "copying config file [ ${servercfgdefault} ]" From e100090b3b263b1eb93a20023228d06808ebed5f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 27 Aug 2024 23:36:11 +0100 Subject: [PATCH 25/49] fix dir --- lgsm/config-default/config-lgsm/xntserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/xntserver/_default.cfg b/lgsm/config-default/config-lgsm/xntserver/_default.cfg index c81db29cfe..c12365273d 100644 --- a/lgsm/config-default/config-lgsm/xntserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/xntserver/_default.cfg @@ -145,7 +145,7 @@ executabledir="${systemdir}" executable="./xonotic-linux64-dedicated" servercfgdir="${systemdir}/${selfname}" servercfg="server.cfg" -servercfgdefault="${systemdir}/server/server.cfg" +servercfgdefault="/server/server.cfg" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory From e5dc911dad8bf394f2f75f53bcb087fc1bc0a72b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 27 Aug 2024 23:42:50 +0100 Subject: [PATCH 26/49] update dirs --- lgsm/config-default/config-lgsm/xntserver/_default.cfg | 9 ++++----- lgsm/modules/fix_xnt.sh | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lgsm/config-default/config-lgsm/xntserver/_default.cfg b/lgsm/config-default/config-lgsm/xntserver/_default.cfg index c12365273d..494f51236b 100644 --- a/lgsm/config-default/config-lgsm/xntserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/xntserver/_default.cfg @@ -11,8 +11,7 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -# List of game types and mutators: https://docs.linuxgsm.com/game-servers/unreal-tournament-3 -startparameters="-userdir ${serverfiles}/Xonotic/${selfname}" +startparameters="-userdir ${systemdir}/${selfname}" #### LinuxGSM Settings #### @@ -143,10 +142,10 @@ glibc="2.3.2" systemdir="${serverfiles}/Xonotic" executabledir="${systemdir}" executable="./xonotic-linux64-dedicated" -servercfgdir="${systemdir}/${selfname}" +servercfgdir="${systemdir}" servercfg="server.cfg" -servercfgdefault="/server/server.cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" +servercfgdefault="server/server.cfg" +servercfgfullpath="${servercfgdir}/${selfname}/${servercfg}" ## Backup Directory backupdir="${lgsmdir}/backup" diff --git a/lgsm/modules/fix_xnt.sh b/lgsm/modules/fix_xnt.sh index 7a3126e311..218b99a660 100644 --- a/lgsm/modules/fix_xnt.sh +++ b/lgsm/modules/fix_xnt.sh @@ -8,6 +8,6 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Create the directory if it doesn't exist -if [ ! -d "${serverfiles}/Xonotic/${selfname}/data" ]; then - mkdir -p "${serverfiles}/Xonotic/${selfname}/data" +if [ ! -d "${systemdir}/${selfname}/data" ]; then + mkdir -p "${systemdir}/${selfname}/data" fi From a2041fc0cd553a9bd435060ed689daaa9c1c8c76 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 27 Aug 2024 23:45:12 +0100 Subject: [PATCH 27/49] fix exit code --- lgsm/modules/install_config.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 06157a809a..910d109ff8 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -70,12 +70,13 @@ fn_default_config_local() { echo -en "copying config file [ ${italic}${servercfgdefault}${default} ]" cp -v --update=none "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}" + exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol - fn_script_log_fail "copying config file [ ${servercfgdefault} ]" + fn_script_log_fail "copying config file [ ${servercfgdefault} ]: " else fn_print_ok_eol - fn_script_log_pass "copying config file [ ${servercfgdefault} ]" + fn_script_log_pass "copying config file [ ${servercfgdefault} ]: " fi } # Changes some variables within the default configs. From 851be6a04ad93fe13248506bbd1082af28b2428d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 27 Aug 2024 23:54:19 +0100 Subject: [PATCH 28/49] fix dir install --- lgsm/modules/install_config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 910d109ff8..41bae7cced 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -64,8 +64,8 @@ fn_default_config_local() { fn_check_cfgdir # Check if the directory for ${servercfgfullpath} exists, if not, create it - if [ ! -d "${servercfgfullpath}" ]; then - mkdir -p "${servercfgfullpath}" + if [ ! -d "$(dirname "${servercfgfullpath}")" ]; then + mkdir -p "$(dirname "${servercfgfullpath}")" fi echo -en "copying config file [ ${italic}${servercfgdefault}${default} ]" From 447bdb934888b989549e5cd4cf7e0d3edffa1513 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 27 Aug 2024 23:56:25 +0100 Subject: [PATCH 29/49] remove -v --- lgsm/modules/install_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 41bae7cced..77a1a785eb 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -69,7 +69,7 @@ fn_default_config_local() { fi echo -en "copying config file [ ${italic}${servercfgdefault}${default} ]" - cp -v --update=none "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}" + cp --update=none "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}" exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol From 672776780c697216dd14284ba445d7c33fb4e3d3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 00:02:42 +0100 Subject: [PATCH 30/49] update settings --- lgsm/config-default/config-lgsm/xntserver/_default.cfg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lgsm/config-default/config-lgsm/xntserver/_default.cfg b/lgsm/config-default/config-lgsm/xntserver/_default.cfg index 494f51236b..f6da18de64 100644 --- a/lgsm/config-default/config-lgsm/xntserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/xntserver/_default.cfg @@ -122,8 +122,8 @@ stopmode="2" # 3: gamedig # 4: gsquery # 5: tcp -querymode="1" -querytype="" +querymode="3" +querytype="xonotic" ## Console type consoleverbose="yes" @@ -132,8 +132,8 @@ consoleinteract="no" ## Game Server Details # Do not edit gamename="Xonotic" -engine="unreal3darkplaces" -glibc="2.3.2" +engine="unreal3" +glibc="2.29" #### Directories #### # Edit with care From cfb89ba08c1ebb78e7ebe2db7dfa0e329ebd0073 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 00:08:01 +0100 Subject: [PATCH 31/49] update info game --- lgsm/modules/info_game.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index f3ee70fcb7..2cf381528c 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2247,17 +2247,16 @@ fn_info_game_wf() { # Filetype: cfg fn_info_game_xnt() { if [ -f "${servercfgfullpath}" ]; then - fn_info_game_ini "adminpassword" "rconpassword" + fn_info_game_ini "rconpassword" "rcon_password" fn_info_game_ini "port" "port" - fn_info_game_ini "queryport" "queryport" fn_info_game_ini "servername" "hostname" fn_info_game_ini "maxplayers" "maxplayers" - else - maxplayers="${maxplayers:-"8"}" - port="${port:-"2600"}" - adminpassword="${rconpassword:-"NOT SET"}" - servername="${servername:-"NOT SET"}" fi + rconpassword="${rconpassword:-"NOT SET"}" + maxplayers="${maxplayers:-"8"}" + port="${port:-"2600"}" + queryport="${port}" + servername="${servername:-"NOT SET"}" } fn_info_game_wmc() { From 440f711cf3ff6366329bdb3d2f578199adad043c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 00:17:49 +0100 Subject: [PATCH 32/49] update config type --- lgsm/modules/info_game.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 2cf381528c..d9767a85d4 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2247,14 +2247,14 @@ fn_info_game_wf() { # Filetype: cfg fn_info_game_xnt() { if [ -f "${servercfgfullpath}" ]; then - fn_info_game_ini "rconpassword" "rcon_password" - fn_info_game_ini "port" "port" - fn_info_game_ini "servername" "hostname" - fn_info_game_ini "maxplayers" "maxplayers" + fn_info_game_quakec "rconpassword" "rcon_password" + fn_info_game_quakec "port" "port" + fn_info_game_quakec "servername" "hostname" + fn_info_game_quakec "maxplayers" "maxplayers" fi rconpassword="${rconpassword:-"NOT SET"}" maxplayers="${maxplayers:-"8"}" - port="${port:-"2600"}" + port="${port:-"0"}" queryport="${port}" servername="${servername:-"NOT SET"}" } From c540be9c5617b8ad831549d1523402bb3c557bb7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 00:28:29 +0100 Subject: [PATCH 33/49] fix dir --- lgsm/config-default/config-lgsm/xntserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/xntserver/_default.cfg b/lgsm/config-default/config-lgsm/xntserver/_default.cfg index f6da18de64..fd96d65405 100644 --- a/lgsm/config-default/config-lgsm/xntserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/xntserver/_default.cfg @@ -145,7 +145,7 @@ executable="./xonotic-linux64-dedicated" servercfgdir="${systemdir}" servercfg="server.cfg" servercfgdefault="server/server.cfg" -servercfgfullpath="${servercfgdir}/${selfname}/${servercfg}" +servercfgfullpath="${servercfgdir}/${selfname}/data/${servercfg}" ## Backup Directory backupdir="${lgsmdir}/backup" From 097699c42970ee99f53c3bad93d3cc8e3adbe5a7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 00:40:20 +0100 Subject: [PATCH 34/49] update config parsing --- lgsm/modules/info_game.sh | 10 +++++----- lgsm/modules/install_config.sh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index d9767a85d4..5b63c84d90 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2242,15 +2242,15 @@ fn_info_game_wf() { servername="${servername:-"NOT SET"}" } -# Config Type: Xonotic +# Config Type: QuakeC # Comment: // # Filetype: cfg fn_info_game_xnt() { if [ -f "${servercfgfullpath}" ]; then - fn_info_game_quakec "rconpassword" "rcon_password" - fn_info_game_quakec "port" "port" - fn_info_game_quakec "servername" "hostname" - fn_info_game_quakec "maxplayers" "maxplayers" + fn_info_game_keyvalue_pairs_space "rconpassword" "rcon_password" + fn_info_game_keyvalue_pairs_space "port" "port" + fn_info_game_keyvalue_pairs_space "servername" "hostname" + fn_info_game_keyvalue_pairs_space "maxplayers" "maxplayers" fi rconpassword="${rconpassword:-"NOT SET"}" maxplayers="${maxplayers:-"8"}" diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 77a1a785eb..28d92126ce 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -68,7 +68,7 @@ fn_default_config_local() { mkdir -p "$(dirname "${servercfgfullpath}")" fi - echo -en "copying config file [ ${italic}${servercfgdefault}${default} ]" + echo -en "copying config file [ ${italic}${servercfgdefault}${default} ]: " cp --update=none "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}" exitcode=$? if [ "${exitcode}" != 0 ]; then From 4d3f40ec5617ef0d73db9e8fd93b7c8323b0d308 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 00:47:27 +0100 Subject: [PATCH 35/49] change to remove config --- lgsm/modules/install_config.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 28d92126ce..7cb1fb1e19 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -842,7 +842,9 @@ elif [ "${shortname}" == "wmc" ]; then fn_default_config_remote fn_set_config_vars elif [ "${shortname}" == "xnt" ]; then - fn_default_config_local + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "wurm" ]; then array_configs+=(server.cfg) From 3352b99c701337b83123ae57e0604f3bd825f8ab Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 00:53:40 +0100 Subject: [PATCH 36/49] add server.cfg --- lgsm/modules/install_config.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 7cb1fb1e19..5f84214b89 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -842,6 +842,7 @@ elif [ "${shortname}" == "wmc" ]; then fn_default_config_remote fn_set_config_vars elif [ "${shortname}" == "xnt" ]; then + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars From 581ed3af573b34704c66560f889b513c640d51db Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 01:01:43 +0100 Subject: [PATCH 37/49] remove serverconfigdefault --- lgsm/config-default/config-lgsm/xntserver/_default.cfg | 1 - lgsm/modules/install_config.sh | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/xntserver/_default.cfg b/lgsm/config-default/config-lgsm/xntserver/_default.cfg index fd96d65405..df6be03fb6 100644 --- a/lgsm/config-default/config-lgsm/xntserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/xntserver/_default.cfg @@ -144,7 +144,6 @@ executabledir="${systemdir}" executable="./xonotic-linux64-dedicated" servercfgdir="${systemdir}" servercfg="server.cfg" -servercfgdefault="server/server.cfg" servercfgfullpath="${servercfgdir}/${selfname}/data/${servercfg}" ## Backup Directory diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 5f84214b89..19f88d4437 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -841,6 +841,7 @@ elif [ "${shortname}" == "wmc" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "xnt" ]; then array_configs+=(server.cfg) fn_fetch_default_config From 6b2aff9e3bf6dbeeb8f19ccc7d413c942b8bec64 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 01:10:44 +0100 Subject: [PATCH 38/49] add new default --- lgsm/config-default/config-lgsm/xntserver/_default.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/config-default/config-lgsm/xntserver/_default.cfg b/lgsm/config-default/config-lgsm/xntserver/_default.cfg index df6be03fb6..e3b13d0cd3 100644 --- a/lgsm/config-default/config-lgsm/xntserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/xntserver/_default.cfg @@ -144,6 +144,7 @@ executabledir="${systemdir}" executable="./xonotic-linux64-dedicated" servercfgdir="${systemdir}" servercfg="server.cfg" +servercfgdefault="server.cfg" servercfgfullpath="${servercfgdir}/${selfname}/data/${servercfg}" ## Backup Directory From 1bc82db36e6da8fe7b05c03ab444d9fdaccaba45 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 15:25:54 +0100 Subject: [PATCH 39/49] move to use an updater --- lgsm/modules/command_start.sh | 5 + lgsm/modules/command_update.sh | 2 + lgsm/modules/core_modules.sh | 5 + lgsm/modules/install_server_files.sh | 2 +- lgsm/modules/update_xnt.sh | 167 +++++++++++++++++++++++++++ 5 files changed, 180 insertions(+), 1 deletion(-) create mode 100644 lgsm/modules/update_xnt.sh diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh index cca0445180..45994a4964 100644 --- a/lgsm/modules/command_start.sh +++ b/lgsm/modules/command_start.sh @@ -163,6 +163,11 @@ fn_start_tmux() { fi rm -f "${lgsmlogdir:?}/.${selfname}-tmux-error.tmp" 2> /dev/null echo -en "\n" + + # Send version command to Xonotic server. + if [ "${shortname}" == "xnt" ]; then + tmux -L "${socketname}" send-keys -t "${sessionname}" version > /dev/null 2>&1 + fi } # If user ran the start command monitor will become enabled. diff --git a/lgsm/modules/command_update.sh b/lgsm/modules/command_update.sh index e1fcec97fe..dd4db072bc 100644 --- a/lgsm/modules/command_update.sh +++ b/lgsm/modules/command_update.sh @@ -33,6 +33,8 @@ elif [ "${shortname}" == "vints" ]; then update_vints.sh elif [ "${shortname}" == "ut99" ]; then update_ut99.sh +elif [ "${shortname}" == "xntl" ]; then + update_xntl.sh else update_steamcmd.sh fi diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 2d9906de49..e26b3f6dd4 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -700,6 +700,11 @@ update_ut99.sh() { fn_fetch_module } +update_xnt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + fn_update_modules.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index 2a87adb863..9d1f9e07fb 100644 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -284,7 +284,7 @@ elif [ "${shortname}" == "ut99" ]; then fn_install_server_files update_ut99.sh elif [ "${shortname}" == "xnt" ]; then - fn_install_server_files + update_xnt.sh elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "q4" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then if [ "${shortname}" == "ut" ]; then install_eula.sh diff --git a/lgsm/modules/update_xnt.sh b/lgsm/modules/update_xnt.sh new file mode 100644 index 0000000000..8dc45264b9 --- /dev/null +++ b/lgsm/modules/update_xnt.sh @@ -0,0 +1,167 @@ +#!/bin/bash +# LinuxGSM command_ut99.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of Unreal Tournament 99 servers. + +module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_update_dl() { + # Download and extract files to serverfiles. + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" + fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" + echo "${remotebuildversion}" > "${serverfiles}/build.txt" + fn_clear_tmp +} + +fn_update_localbuild() { + # Gets local build info. + fn_print_dots "Checking local build: ${remotelocation}" + # Uses log file to get local build. + localbuild=$(grep "SVQC version: xonotic-v" "${consolelogdir}"/* 2> /dev/null | tail -1 | sed 's/.*SVQC version: \(xonotic-v[0-9.]*\).*/\1/' | tr -d '\000-\011\013-\037') + if [ -z "${localbuild}" ]; then + fn_print_error "Checking local build: ${remotelocation}: missing local build info" + fn_script_log_error "Missing local build info" + fn_script_log_error "Set localbuild to 0" + localbuild="0" + else + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" + fi +} + +fn_update_remotebuild() { + # Get remote build info. + apiurl="https://api.github.com/repos/xonotic/xonotic/tags" + remotebuildresponse=$(curl -s "${apiurl}") + remotebuildtag=$(echo "${remotebuildresponse}" | jq -r '.[0].name') + remotebuildurl="https://dl.xonotic.org/${remotebuildtag}.zip" + remotebuildfilename="${remotebuildtag}.zip" + remotebuildversion="${remotebuildtag}" + + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fail "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_compare() { + fn_print_dots "Checking for update: ${remotelocation}" + # Update has been found or force update. + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + # Create update lockfile. + date '+%s' > "${lockdir:?}/update.lock" + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "Update available" + echo -e "* Local build: ${red}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + echo -en "\n" + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" + + if [ "${commandname}" == "UPDATE" ]; then + date +%s > "${lockdir}/last-updated.lock" + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + fn_sleep_time_5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + fn_update_dl + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fi + unset exitbypass + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" + fi + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "No update available" + echo -e "* Local build: ${green}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + echo -en "\n" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + fi +} + +# The location where the builds are checked and downloaded. +remotelocation="github.com" + +if [ "${firstcommandname}" == "INSTALL" ]; then + fn_update_remotebuild + fn_update_dl +else + fn_print_dots "Checking for update" + fn_print_dots "Checking for update: ${remotelocation}" + fn_script_log_info "Checking for update: ${remotelocation}" + fn_update_localbuild + fn_update_remotebuild + fn_update_compare +fi From 3e1e871128377dc14ae6ae3578ec850e4a88efff Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 15:35:38 +0100 Subject: [PATCH 40/49] send key to update function --- lgsm/modules/command_start.sh | 5 ----- lgsm/modules/update_xnt.sh | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh index 45994a4964..cca0445180 100644 --- a/lgsm/modules/command_start.sh +++ b/lgsm/modules/command_start.sh @@ -163,11 +163,6 @@ fn_start_tmux() { fi rm -f "${lgsmlogdir:?}/.${selfname}-tmux-error.tmp" 2> /dev/null echo -en "\n" - - # Send version command to Xonotic server. - if [ "${shortname}" == "xnt" ]; then - tmux -L "${socketname}" send-keys -t "${sessionname}" version > /dev/null 2>&1 - fi } # If user ran the start command monitor will become enabled. diff --git a/lgsm/modules/update_xnt.sh b/lgsm/modules/update_xnt.sh index 8dc45264b9..1a770a4a1e 100644 --- a/lgsm/modules/update_xnt.sh +++ b/lgsm/modules/update_xnt.sh @@ -18,6 +18,11 @@ fn_update_dl() { fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" + + # Send version command to Xonotic server. + tmux -L "${socketname}" send-keys -t "${sessionname}" "version\r" > /dev/null 2>&1 + fn_sleep_time_1 + # Uses log file to get local build. localbuild=$(grep "SVQC version: xonotic-v" "${consolelogdir}"/* 2> /dev/null | tail -1 | sed 's/.*SVQC version: \(xonotic-v[0-9.]*\).*/\1/' | tr -d '\000-\011\013-\037') if [ -z "${localbuild}" ]; then From 5423b69d404a065b33dd4b2ff01ef53febf3183d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 15:42:33 +0100 Subject: [PATCH 41/49] typo --- lgsm/modules/command_update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/command_update.sh b/lgsm/modules/command_update.sh index dd4db072bc..a579cfe8e3 100644 --- a/lgsm/modules/command_update.sh +++ b/lgsm/modules/command_update.sh @@ -33,8 +33,8 @@ elif [ "${shortname}" == "vints" ]; then update_vints.sh elif [ "${shortname}" == "ut99" ]; then update_ut99.sh -elif [ "${shortname}" == "xntl" ]; then - update_xntl.sh +elif [ "${shortname}" == "xnt" ]; then + update_xnt.sh else update_steamcmd.sh fi From 7145968ca5941c381cdc56bbf483efd9484f9b40 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 15:46:24 +0100 Subject: [PATCH 42/49] change extract location --- lgsm/modules/update_xnt.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lgsm/modules/update_xnt.sh b/lgsm/modules/update_xnt.sh index 1a770a4a1e..fa3f350d59 100644 --- a/lgsm/modules/update_xnt.sh +++ b/lgsm/modules/update_xnt.sh @@ -9,9 +9,8 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { # Download and extract files to serverfiles. - fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" - fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" - echo "${remotebuildversion}" > "${serverfiles}/build.txt" + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}" + fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" "Xonotic" fn_clear_tmp } From 9ca1fccfd534efffc3224151f15b2b6dc9840bdd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 15:46:44 +0100 Subject: [PATCH 43/49] update directory location --- lgsm/config-default/config-lgsm/xntserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/xntserver/_default.cfg b/lgsm/config-default/config-lgsm/xntserver/_default.cfg index e3b13d0cd3..5e7d17e78d 100644 --- a/lgsm/config-default/config-lgsm/xntserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/xntserver/_default.cfg @@ -139,7 +139,7 @@ glibc="2.29" # Edit with care ## Game Server Directories -systemdir="${serverfiles}/Xonotic" +systemdir="${serverfiles}" executabledir="${systemdir}" executable="./xonotic-linux64-dedicated" servercfgdir="${systemdir}" From cc98369023e4bf9512ea56bc4dec0845d2b7a498 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 15:52:40 +0100 Subject: [PATCH 44/49] filename fix --- lgsm/modules/update_xnt.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/update_xnt.sh b/lgsm/modules/update_xnt.sh index fa3f350d59..d935e39890 100644 --- a/lgsm/modules/update_xnt.sh +++ b/lgsm/modules/update_xnt.sh @@ -40,8 +40,10 @@ fn_update_remotebuild() { apiurl="https://api.github.com/repos/xonotic/xonotic/tags" remotebuildresponse=$(curl -s "${apiurl}") remotebuildtag=$(echo "${remotebuildresponse}" | jq -r '.[0].name') - remotebuildurl="https://dl.xonotic.org/${remotebuildtag}.zip" - remotebuildfilename="${remotebuildtag}.zip" + remotebuildfilename=$(echo "${remotebuildtag}" | tr -d 'v') + remotebuildfilename="${remotebuildfilename}.zip" + remotebuildurl="https://dl.xonotic.org/${remotebuildfilename}" + remotebuildversion="${remotebuildtag}" if [ "${firstcommandname}" != "INSTALL" ]; then From 884e9bbba4a2fa840933b9f7140355b0eeeb0fd7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 15:56:52 +0100 Subject: [PATCH 45/49] update dirs --- lgsm/config-default/config-lgsm/xntserver/_default.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/config-default/config-lgsm/xntserver/_default.cfg b/lgsm/config-default/config-lgsm/xntserver/_default.cfg index 5e7d17e78d..bdee7fd0e2 100644 --- a/lgsm/config-default/config-lgsm/xntserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/xntserver/_default.cfg @@ -142,10 +142,10 @@ glibc="2.29" systemdir="${serverfiles}" executabledir="${systemdir}" executable="./xonotic-linux64-dedicated" -servercfgdir="${systemdir}" +servercfgdir="${systemdir}/${selfname}/data" servercfg="server.cfg" -servercfgdefault="server.cfg" -servercfgfullpath="${servercfgdir}/${selfname}/data/${servercfg}" +servercfgdefault="${systemdir}/server.cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory backupdir="${lgsmdir}/backup" From 37bfcc7518abaa4fba7cf4058af1995d855ac25a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 21:06:56 +0100 Subject: [PATCH 46/49] fix extraction --- lgsm/modules/core_dl.sh | 5 ++++- lgsm/modules/install_server_files.sh | 8 -------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh index 89a63eb8b1..908c90f386 100644 --- a/lgsm/modules/core_dl.sh +++ b/lgsm/modules/core_dl.sh @@ -251,7 +251,10 @@ fn_dl_extract() { fi elif [ "${mime}" == "application/zip" ]; then if [ -n "${extractsrc}" ]; then - extractcmd=$(unzip -qoj -d "${extractdest}" "${local_filedir}/${local_filename}" "${extractsrc}"/*) + temp_extractdir="${tmpdir}/Xonotic" + extractcmd=$(unzip -qo "${local_filedir}/${local_filename}" "${extractsrc}/*" -d "${temp_extractdir}") + find "${temp_extractdir}/${extractsrc}" -mindepth 1 -maxdepth 1 -exec mv -t "${extractdest}" {} + + rm -rf "${temp_extractdir}" else extractcmd=$(unzip -qo -d "${extractdest}" "${local_filedir}/${local_filename}") fi diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index 9d1f9e07fb..57ce58ca79 100644 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -224,14 +224,6 @@ fn_install_server_files() { run="norun" force="noforce" md5="93705e165550c97484678236749198a4" - elif [ "${shortname}" == "xnt" ]; then - remote_fileurl="https://dl.xonotic.org/xonotic-0.8.6.zip" - local_filedir="${tmpdir}" - local_filename="xonotic-0.8.6.zip" - chmodx="nochmodx" - run="norun" - force="noforce" - md5="32cdf9f90930e4599177dafc41adda48" elif [ "${shortname}" == "zmr" ]; then remote_fileurl="http://linuxgsm.download/ZombieMasterReborn/zombie_master_reborn_b6_1.tar.xz" local_filedir="${tmpdir}" From 98136667e3bf2d26771e131ae0a96843783978ea Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 21:16:36 +0100 Subject: [PATCH 47/49] creatre datadir if missing --- lgsm/modules/core_modules.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index e26b3f6dd4..dad8dddf52 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -831,6 +831,11 @@ if [ ! -d "${lockdir}" ]; then mkdir -p "${lockdir}" fi +# Creates data dir if missing +if [ ! -d "${datadir}" ]; then + mkdir -p "${datadir}" +fi + # if $USER id missing set to whoami if [ -z "${USER}" ]; then USER="$(whoami)" From e942a78bf14c0d438049c88459ccd5d4c0083641 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 21:25:20 +0100 Subject: [PATCH 48/49] consoleinteract yes --- lgsm/config-default/config-lgsm/xntserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/xntserver/_default.cfg b/lgsm/config-default/config-lgsm/xntserver/_default.cfg index bdee7fd0e2..402e6188f4 100644 --- a/lgsm/config-default/config-lgsm/xntserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/xntserver/_default.cfg @@ -127,7 +127,7 @@ querytype="xonotic" ## Console type consoleverbose="yes" -consoleinteract="no" +consoleinteract="yes" ## Game Server Details # Do not edit From 54c0c51ce342fde36f76c250f49c890e6368bc0a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 21:30:11 +0100 Subject: [PATCH 49/49] lint --- lgsm/modules/info_game.sh | 6 +++--- lgsm/modules/install_config.sh | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 5b63c84d90..d56d4fbff9 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2247,15 +2247,15 @@ fn_info_game_wf() { # Filetype: cfg fn_info_game_xnt() { if [ -f "${servercfgfullpath}" ]; then - fn_info_game_keyvalue_pairs_space "rconpassword" "rcon_password" + fn_info_game_keyvalue_pairs_space "maxplayers" "maxplayers" fn_info_game_keyvalue_pairs_space "port" "port" + fn_info_game_keyvalue_pairs_space "rconpassword" "rcon_password" fn_info_game_keyvalue_pairs_space "servername" "hostname" - fn_info_game_keyvalue_pairs_space "maxplayers" "maxplayers" fi - rconpassword="${rconpassword:-"NOT SET"}" maxplayers="${maxplayers:-"8"}" port="${port:-"0"}" queryport="${port}" + rconpassword="${rconpassword:-"NOT SET"}" servername="${servername:-"NOT SET"}" } diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 19f88d4437..96ae706546 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -79,6 +79,7 @@ fn_default_config_local() { fn_script_log_pass "copying config file [ ${servercfgdefault} ]: " fi } + # Changes some variables within the default configs. # SERVERNAME to LinuxGSM # PASSWORD to random password