diff --git a/lgsm/config-default/config-lgsm/q4server/_default.cfg b/lgsm/config-default/config-lgsm/q4server/_default.cfg new file mode 100644 index 000000000..ffd311e3c --- /dev/null +++ b/lgsm/config-default/config-lgsm/q4server/_default.cfg @@ -0,0 +1,186 @@ +################################## +######## 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 #### + +## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login +steamuser="username" +steampass='password' + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +port="28004" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set net_port ${port} +exec ${servercfg}" + +#### 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". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## 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" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="2210" +steamcmdforcewindows="yes" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## 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="3" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="quake4" + +## Console type +consoleverbose="yes" +consoleinteract="yes" + +## Game Server Details +# Do not edit +gamename="Quake 4" +engine="idtech3_ql" +glibc="2.15" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +executable="./quake4-dedicated" +servercfgdir="${systemdir}/q4base" +servercfg="${selfname}.cfg" +servercfgdefault="server.cfg" +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" + +## 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 561b3c134..6427b1460 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 64a9e0645..2b6ea075d 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index a1b10095e..2c876efc2 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 561b3c134..6427b1460 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 64a9e0645..2b6ea075d 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index c890739c5..e7e81b75e 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-11-jre,rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index c265a1f4b..a40fd1c7b 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-17-jre,rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 00351bde8..5141290ff 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-17-jre,rng-tools5 q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 6fd3c21ee..6deebf592 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-8-jre,rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/gameicons/q4-icon.png b/lgsm/data/gameicons/q4-icon.png new file mode 100644 index 000000000..dd4c2d7fa Binary files /dev/null and b/lgsm/data/gameicons/q4-icon.png differ diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 8a748cda7..373992242 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 561b3c134..6427b1460 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 64a9e0645..2b6ea075d 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 561b3c134..6427b1460 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 64a9e0645..2b6ea075d 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 20ea2e6c7..16c1e812f 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -87,6 +87,7 @@ pvr,pvrserver,Pavlov VR,ubuntu-22.04 pz,pzserver,Project Zomboid,ubuntu-22.04 q2,q2server,Quake 2,ubuntu-22.04 q3,q3server,Quake 3: Arena,ubuntu-22.04 +q4,q4server,Quake 4,ubuntu-22.04 ql,qlserver,Quake Live,ubuntu-22.04 qw,qwserver,Quake World,ubuntu-22.04 ricochet,ricochetserver,Ricochet,ubuntu-22.04 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index e91bec26d..b2c62f49f 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-8-jre,rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index c890739c5..e7e81b75e 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-11-jre,rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index e66eb7dc6..e751ad7e3 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-17-jre,rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index ffc637ab7..dfbe3f3e4 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-17-jre,rng-tools5 q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index 65e17bf1b..24b6ef39e 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-17-jre,rng-tools5 q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/ubuntu-23.10.csv b/lgsm/data/ubuntu-23.10.csv index 65e17bf1b..24b6ef39e 100644 --- a/lgsm/data/ubuntu-23.10.csv +++ b/lgsm/data/ubuntu-23.10.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-17-jre,rng-tools5 q2 q3 +q4 ql qw ricochet diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index d22570716..81767408d 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1685,6 +1685,25 @@ fn_info_game_q3() { defaultmap="${defaultmap:-"NOT SET"}" } +# Config Type: QuakeC +# Comment: // or /* */ +# fn_info_game_quakec "SERVERNAME" +# Filetype: cfg +fn_info_game_q4() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "maxplayers" "sv_maxclients" + fn_info_game_quakec "rconpassword" "net_serverRemoteConsolePassword" + fn_info_game_quakec "servername" "si_name" + fn_info_game_quakec "serverpassword" "g_password" + fi + maxplayers="${maxplayers:-"0"}" + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" + port="${port:-"0"}" + queryport="${port}" + defaultmap="${defaultmap:-"NOT SET"}" +} + # Config Type: QuakeC # Comment: // or /* */ # Example: set sv_hostname "SERVERNAME" @@ -2346,6 +2365,8 @@ elif [ "${shortname}" == "q2" ]; then fn_info_game_q2 elif [ "${shortname}" == "q3" ]; then fn_info_game_q3 +elif [ "${shortname}" == "q4" ]; then + fn_info_game_q4 elif [ "${shortname}" == "ql" ]; then fn_info_game_ql elif [ "${shortname}" == "qw" ]; then diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index fe019da44..1e3bfad4b 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -694,6 +694,8 @@ fn_info_messages_ports() { portcommand="ss -tuplwn | grep bf1942_lnxded" elif [ "${shortname}" == "dayz" ]; then portcommand="ss -tuplwn | grep enfMain" + elif [ "${shortname}" == "q4" ]; then + portcommand="ss -tuplwn | grep q4ded.x86" elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "nec" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then portcommand="ss -tuplwn | grep java" elif [ "${shortname}" == "terraria" ]; then @@ -1286,6 +1288,7 @@ fn_info_messages_q2() { { fn_port "header" fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } @@ -1293,6 +1296,15 @@ fn_info_messages_q3() { { fn_port "header" fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_messages_q4() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } @@ -1792,6 +1804,8 @@ fn_info_messages_select_engine() { fn_info_messages_q2 elif [ "${shortname}" == "q3" ]; then fn_info_messages_q3 + elif [ "${shortname}" == "q4" ]; then + fn_info_messages_q3 elif [ "${shortname}" == "ql" ]; then fn_info_messages_ql elif [ "${shortname}" == "qw" ]; then diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 0e688b65d..a163243dc 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -634,6 +634,12 @@ elif [ "${shortname}" == "q2" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "q3" ]; then + array_configs+=(server.cfg) + fn_fetch_default_configs + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "q4" ]; then array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index 2763f470b..c5fe822ad 100644 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -106,6 +106,13 @@ fn_install_server_files() { 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" + force="noforce" + md5="afe30b44f23c8ae2ce6f0f464473d8ba" elif [ "${shortname}" == "qw" ]; then remote_fileurl="http://linuxgsm.download/QuakeWorld/nquake.server.linux.190506.full.tar.xz" local_filedir="${tmpdir}" @@ -240,7 +247,7 @@ elif [ "${shortname}" == "vints" ]; then elif [ "${shortname}" == "ut99" ]; then fn_install_server_files update_ut99.sh -elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then +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 fi