Parcourir la source

feat(ceserver): add Conan Exiles server (#5068)

* feat(ceserver): add Conan Exiles server

Adds the native Linux dedicated server for Conan Exiles (Enhanced),
Steam appid 443030.

Resolves #4923

* feat(ceserver): add stop mode for Conan Exiles

The first CTRL+c runs the engine shutdown but the process then hangs.
A second CTRL+c exits it.

* fix(ceserver): require glibc 2.28
Daniel Gibbs il y a 1 jour
Parent
commit
d8ba5da7bb

+ 216 - 0
lgsm/config-default/config-lgsm/ceserver/_default.cfg

@@ -0,0 +1,216 @@
+##################################
+######## 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
+ip="0.0.0.0"
+port="7777"
+queryport="27015"
+servername="LinuxGSM"
+maxplayers="40"
+
+## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
+startparameters="ConanSandbox -log -MULTIHOME=${ip} -Port=${port} -QueryPort=${queryport} -ServerName='${servername}' -MaxPlayers=${maxplayers}"
+
+#### 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"
+
+# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy
+ntfyalert="off"
+ntfytopic="LinuxGSM"
+ntfyserver="https://ntfy.sh"
+ntfytoken=""
+ntfyusername=""
+ntfypassword=""
+ntfypriority=""
+ntfytags=""
+
+# Matrix Alerts | https://docs.linuxgsm.com/alerts/matrix
+matrixalert="off"
+matrixhomeserver="matrix.org"
+matrixtoken="accesstoken"
+matrixroom=""
+
+# 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=""
+
+## Stop | https://docs.linuxgsm.com/commands/start-stop-restart
+stoponlyifnoplayers="off"
+stoponlyifnoplayersallcommands="on"
+
+## Player Warnings | https://docs.linuxgsm.com/features/player-warnings
+# Minutes to warn players in-game before a stop, restart or update. 0 to disable.
+# e.g. 15 warns at 15, 10, 5, 3 and 1 minutes.
+warnplayerstimer="0"
+
+## 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="5"
+
+## 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="443030"
+steamcmdforcewindows="no"
+# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch
+branch=""
+betapassword=""
+# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
+steammaster="true"
+
+## 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
+# 12: shutdown
+# 13: soulmask
+# 14: Running With Rifles
+# 15: Rising World
+# 16: Conan Exiles
+stopmode="16"
+
+## Query mode
+# 1: session only
+# 2: gamedig (gsquery fallback)
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
+## Console type
+consoleverbose="yes"
+consoleinteract="no"
+
+## Game Server Details
+# Do not edit
+gamename="Conan Exiles"
+engine="unreal5"
+glibc="2.28"
+
+#### Directories ####
+# Edit with care
+
+## Game Server Directories
+systemdir="${serverfiles}/ConanSandbox"
+executabledir="${systemdir}/Binaries/Linux"
+executable="./ConanSandboxServer-Linux-Shipping"
+servercfgdir="${systemdir}/Saved/Config/LinuxServer"
+servercfg="ServerSettings.ini"
+servercfgfullpath="${servercfgdir}/${servercfg}"
+
+## Backup Directory
+backupdir="${lgsmdir}/backup"
+
+## Logging Directories
+[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log"
+gamelogdir="${systemdir}/Saved/Logs"
+lgsmlogdir="${logdir}/script"
+consolelogdir="${logdir}/console"
+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"

+ 1 - 0
lgsm/data/almalinux-8.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu,dos2unix,libxml2
 btl
 cc
+ce
 ck,xorg-x11-server-Xvfb
 cmw
 cod

+ 1 - 0
lgsm/data/almalinux-9.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu,dos2unix,libxml2
 btl
 cc
+ce
 ck,xorg-x11-server-Xvfb
 cmw
 cod

+ 1 - 0
lgsm/data/centos-7.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu,dos2unix,libxml2
 btl
 cc
+ce
 ck,xorg-x11-server-Xvfb
 cmw
 cod,compat-libstdc++-33.i686

+ 1 - 0
lgsm/data/centos-8.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu,dos2unix,libxml2
 btl
 cc
+ce
 ck,xorg-x11-server-Xvfb
 cmw
 cod

+ 1 - 0
lgsm/data/centos-9.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu,dos2unix,libxml2
 btl
 cc
+ce
 ck,xorg-x11-server-Xvfb
 cmw
 cod

+ 1 - 0
lgsm/data/debian-10.csv

@@ -18,6 +18,7 @@ bs
 bt,libicu-dev,dos2unix,libxml2-utils
 btl
 cc
+ce
 ck,xvfb,libxi6
 cmw
 cod,libstdc++5:i386

+ 1 - 0
lgsm/data/debian-11.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu-dev,dos2unix,libxml2-utils
 btl
 cc
+ce
 ck,xvfb,libxi6
 cmw
 cod,libstdc++5:i386

+ 1 - 0
lgsm/data/debian-12.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu-dev,dos2unix,libxml2-utils
 btl
 cc
+ce
 ck,xvfb,libxi6
 cmw
 cod,libstdc++5:i386

+ 1 - 0
lgsm/data/debian-13.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu-dev,dos2unix,libxml2
 btl
 cc
+ce
 ck,xvfb,libxi6
 cmw
 cod,libc6:i386

+ 1 - 0
lgsm/data/debian-9.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu-dev,dos2unix,libxml2-utils
 btl
 cc
+ce
 ck,xvfb,libxi6
 cmw
 cod,libstdc++5:i386

BIN
lgsm/data/gameicons/ce-icon.png


+ 1 - 0
lgsm/data/rhel-7.csv

@@ -20,6 +20,7 @@ bs
 bt,libicu,dos2unix,libxml2
 btl
 cc
+ce
 ck,xorg-x11-server-Xvfb
 cmw
 cod,compat-libstdc++-33.i686

+ 1 - 0
lgsm/data/rhel-8.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu,dos2unix,libxml2
 btl
 cc
+ce
 ck,xorg-x11-server-Xvfb
 cmw
 cod

+ 1 - 0
lgsm/data/rhel-9.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu,dos2unix,libxml2
 btl
 cc
+ce
 ck,xorg-x11-server-Xvfb
 cmw
 cod

+ 1 - 0
lgsm/data/rocky-8.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu,dos2unix,libxml2
 btl
 cc
+ce
 ck,xorg-x11-server-Xvfb
 cmw
 cod

+ 1 - 0
lgsm/data/rocky-9.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu,dos2unix,libxml2
 btl
 cc
+ce
 ck,xorg-x11-server-Xvfb
 cmw
 cod

+ 1 - 0
lgsm/data/serverlist.csv

@@ -18,6 +18,7 @@ bs,bsserver,Blade Symphony,ubuntu-26.04
 bt,btserver,Barotrauma,ubuntu-26.04
 btl,btlserver,BATTALION: Legacy,ubuntu-20.04
 cc,ccserver,Codename CURE,ubuntu-26.04
+ce,ceserver,Conan Exiles,ubuntu-26.04
 ck,ckserver,Core Keeper,ubuntu-26.04
 cmw,cmwserver,Chivalry: Medieval Warfare,ubuntu-26.04
 cod,codserver,Call of Duty,ubuntu-24.04

+ 1 - 0
lgsm/data/ubuntu-16.04.csv

@@ -20,6 +20,7 @@ bs
 bt,libicu-dev,dos2unix,libxml2-utils
 btl
 cc
+ce
 ck,xvfb,libxi6
 cmw
 cod,libstdc++5:i386

+ 1 - 0
lgsm/data/ubuntu-18.04.csv

@@ -20,6 +20,7 @@ bs
 bt,libicu-dev,dos2unix,libxml2-utils
 btl
 cc
+ce
 ck,xvfb,libxi6
 cmw
 cod,libstdc++5:i386

+ 1 - 0
lgsm/data/ubuntu-20.04.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu-dev,dos2unix,libxml2-utils
 btl
 cc
+ce
 ck,xvfb,libxi6
 cmw
 cod,libstdc++5:i386

+ 1 - 0
lgsm/data/ubuntu-22.04.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu-dev,dos2unix,libxml2-utils
 btl
 cc
+ce
 ck,xvfb,libxi6
 cmw
 cod,libstdc++5:i386

+ 1 - 0
lgsm/data/ubuntu-23.04.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu-dev,dos2unix,libxml2-utils
 btl
 cc
+ce
 ck,xvfb,libxi6
 cmw
 cod,libstdc++5:i386

+ 1 - 0
lgsm/data/ubuntu-23.10.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu-dev,dos2unix,libxml2-utils
 btl
 cc
+ce
 ck,xvfb,libxi6
 cmw
 cod,libstdc++5:i386

+ 1 - 0
lgsm/data/ubuntu-24.04.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu-dev,dos2unix,libxml2-utils
 btl
 cc
+ce
 ck,xvfb,libxi6
 cmw
 cod,libstdc++5:i386

+ 1 - 0
lgsm/data/ubuntu-26.04.csv

@@ -19,6 +19,7 @@ bs
 bt,libicu-dev,dos2unix,libxml2-utils
 btl
 cc
+ce
 ck,xvfb,libxi6
 cmw
 cod,libc6:i386

+ 2 - 0
lgsm/modules/check_system_requirements.sh

@@ -25,6 +25,8 @@ elif [ "${shortname}" == "bt" ]; then
 	ramrequirementgb="1"
 elif [ "${shortname}" == "cc" ]; then
 	ramrequirementgb="1"
+elif [ "${shortname}" == "ce" ]; then
+	ramrequirementgb="8"
 elif [ "${shortname}" == "dayz" ]; then
 	ramrequirementgb="5"
 elif [ "${shortname}" == "dodr" ]; then

+ 10 - 0
lgsm/modules/command_stop.sh

@@ -470,6 +470,14 @@ fn_stop_graceful_rwr() {
 	fn_stop_graceful_ctrlc
 }
 
+fn_stop_graceful_ce() {
+	fn_print_dots "Graceful: CTRL+c"
+	fn_script_log_info "Graceful: CTRL+c"
+	TERM=screen tmux -L "${socketname}" send-keys -t "${sessionname}" C-c > /dev/null 2>&1
+	fn_sleep_time_5
+	fn_stop_graceful_ctrlc
+}
+
 # Attempts graceful shutdown of Rising World using 'shutdown'.
 # Its console can miss input, so the command is sent again every 10 seconds until the server stops.
 fn_stop_graceful_rw() {
@@ -535,6 +543,8 @@ fn_stop_graceful_select() {
 		fn_stop_graceful_rwr
 	elif [ "${stopmode}" == "15" ]; then
 		fn_stop_graceful_rw
+	elif [ "${stopmode}" == "16" ]; then
+		fn_stop_graceful_ce
 	fi
 }
 

+ 21 - 0
lgsm/modules/info_game.sh

@@ -1052,6 +1052,25 @@ fn_info_game_cd() {
 	steamport="${steamport:-"0"}"
 }
 
+# Config Type: ini
+# Parameters: true
+# Comment: ; or #
+# Example: ServerPassword=PASSWORD
+# Filetype: ini
+fn_info_game_ce() {
+	if [ -f "${servercfgfullpath}" ]; then
+		fn_info_game_ini "adminpassword" "AdminPassword"
+		fn_info_game_ini "serverpassword" "ServerPassword"
+	fi
+	adminpassword="${adminpassword:-"NOT SET"}"
+	maxplayers="${maxplayers:-"0"}"
+	port="${port:-"0"}"
+	queryport="${queryport:-"0"}"
+	rawport="$((port + 1))"
+	servername="${servername:-"NOT SET"}"
+	serverpassword="${serverpassword:-"NOT SET"}"
+}
+
 # Config Type: json
 # Parameters: true
 # Comment: // or /* */
@@ -2436,6 +2455,8 @@ elif [ "${shortname}" == "bt" ]; then
 	fn_info_game_bt
 elif [ "${shortname}" == "btl" ]; then
 	fn_info_game_btl
+elif [ "${shortname}" == "ce" ]; then
+	fn_info_game_ce
 elif [ "${shortname}" == "ck" ]; then
 	fn_info_game_ck
 elif [ "${shortname}" == "cmw" ]; then

+ 14 - 1
lgsm/modules/info_messages.sh

@@ -737,7 +737,7 @@ fn_info_messages_ports_edit() {
 		fi
 	done
 	# engines/games that require editing the start parameters.
-	local ports_edit_array=("av" "ck" "col" "cs2" "fctr" "goldsrc" "hcu" "hw" "hyt" "iw3.0" "ioquake3" "pw" "qfusion" "rsdw" "rust" "scpsl" "sf" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh")
+	local ports_edit_array=("av" "ce" "ck" "col" "cs2" "fctr" "goldsrc" "hcu" "hw" "hyt" "iw3.0" "ioquake3" "pw" "qfusion" "rsdw" "rust" "scpsl" "sf" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh")
 	for port_edit in "${ports_edit_array[@]}"; do
 		if [ "${engine}" == "${port_edit}" ] || [ "${gamename}" == "${port_edit}" ] || [ "${shortname}" == "${port_edit}" ]; then
 			startparameterslocation="${configdirserver}"
@@ -757,6 +757,8 @@ fn_info_messages_ports() {
 		portcommand="ss -tuplwn | grep bf1942_lnxded"
 	elif [ "${shortname}" == "bfv" ]; then
 		portcommand="ss -tuplwn | grep bfv_linded"
+	elif [ "${shortname}" == "ce" ]; then
+		portcommand="ss -tuplwn | grep ConanSandbox"
 	elif [ "${shortname}" == "dayz" ]; then
 		portcommand="ss -tuplwn | grep enfMain"
 	elif [ "${shortname}" == "q4" ]; then
@@ -958,6 +960,15 @@ fn_info_messages_cd() {
 	} | column -s $'\t' -t
 }
 
+fn_info_messages_ce() {
+	{
+		fn_port "header"
+		fn_port "Game" port udp
+		fn_port "Raw UDP" rawport udp
+		fn_port "Query" queryport udp
+	} | column -s $'\t' -t
+}
+
 fn_info_messages_ck() {
 	{
 		fn_port "header"
@@ -1871,6 +1882,8 @@ fn_info_messages_select_engine() {
 		fn_info_messages_bt
 	elif [ "${shortname}" == "btl" ]; then
 		fn_info_messages_btl
+	elif [ "${shortname}" == "ce" ]; then
+		fn_info_messages_ce
 	elif [ "${shortname}" == "ck" ]; then
 		fn_info_messages_ck
 	elif [ "${shortname}" == "cs2" ]; then