From 9acd6ddc4dd177ddbc859bdc456d715595599978 Mon Sep 17 00:00:00 2001 From: h3o66 Date: Tue, 16 Jul 2019 04:11:18 +0200 Subject: [PATCH 01/18] feat(newserver) Soldat --- .../config-lgsm/sserver/_default.cfg | 127 ++++++++++++++++++ lgsm/data/serverlist.csv | 1 + lgsm/functions/command_stop.sh | 2 +- lgsm/functions/info_config.sh | 15 +++ lgsm/functions/info_messages.sh | 14 +- lgsm/functions/info_parms.sh | 10 ++ lgsm/functions/install_config.sh | 6 + lgsm/functions/install_server_files.sh | 4 +- 8 files changed, 176 insertions(+), 3 deletions(-) create mode 100644 lgsm/config-default/config-lgsm/sserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/sserver/_default.cfg b/lgsm/config-default/config-lgsm/sserver/_default.cfg new file mode 100644 index 0000000000..96e8b789e6 --- /dev/null +++ b/lgsm/config-default/config-lgsm/sserver/_default.cfg @@ -0,0 +1,127 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT 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 + +#### Server Settings #### + +## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters +ip="0.0.0.0" +port="23073" +maxplayers="32" +maplist="mapslist.txt" + +## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +fn_parms(){ +parms="-b ${ip} -p ${port} -l ${maxplayers} -m ${maplist} -c ${servercfg}" +} + +#### LinuxGSM Settings #### + +## 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" +postdays="7" +posttarget="https://hastebin.com" + +# 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="" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# 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" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring". +# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need +# any custom string in curl - simple ignore this parameter. +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +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" + +#### LinuxGSM Advanced Settings #### + +# ANSI Colors +ansi="on" + +# Message Display Time +sleeptime="0.5" + +## LinuxGSM Server Details +# Do not edit +gamename="Soldat" +engine="soldat" +glibc="2.1" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${serverfiles}" +executabledir="${systemdir}" +executable="./soldatserver" +servercfg="soldat.ini" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${serverfiles}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +alertlog="${lgsmlogdir}/${servicename}-alert.log" +postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index f63247e821..e9757e6db5 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -73,6 +73,7 @@ samp,sampserver,San Andreas Multiplayer sbots,sbotsserver, StickyBots sfc,sfcserver,SourceForts Classic sof2,sof2server,Soldier Of Fortune 2: Gold Edition +soldat,sserver,Soldat ss3,ss3server,Serious Sam 3: BFE sb,sbserver,Starbound st,stserver,Stationeers diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index ad3b648823..03dd84a25b 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -195,7 +195,7 @@ fn_stop_graceful_select(){ fn_stop_graceful_cmd "quit" 120 elif [ "${engine}" == "goldsource" ]; then fn_stop_graceful_goldsource - elif [ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal4" ]||[ "${engine}" == "unreal3" ]||[ "${engine}" == "unreal2" ]||[ "${engine}" == "unreal" ]||[ "${shortname}" == "fctr" ]||[ "${shortname}" == "mumble" ]||[ "${shortname}" == "wurm" ]||[ "${shortname}" == "jc2" ]||[ "${shortname}" == "jc3" ]; then + elif [ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal4" ]||[ "${engine}" == "unreal3" ]||[ "${engine}" == "unreal2" ]||[ "${engine}" == "unreal" ]||[ "${shortname}" == "fctr" ]||[ "${shortname}" == "mumble" ]||[ "${shortname}" == "wurm" ]||[ "${shortname}" == "jc2" ]||[ "${shortname}" == "jc3" ]||[ "${shortname}" == "soldat" ]; then fn_stop_graceful_ctrlc elif [ "${engine}" == "source" ]||[ "${engine}" == "quake" ]||[ "${engine}" == "idtech2" ]||[ "${engine}" == "idtech3" ]||[ "${engine}" == "idtech3_ql" ]||[ "${shortname}" == "pz" ]||[ "${shortname}" == "rw" ]; then fn_stop_graceful_cmd "quit" 30 diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 275fb54f26..ee634105f5 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -1212,6 +1212,18 @@ fn_info_config_mordhau(){ fi } +fn_info_config_soldat(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + adminpassword="${unavailable}" + else + servername=$(grep "Server_Name" "${servercfgfullpath}" | awk -F '=' '{print $2}') + serverpassword=$(grep "Game_Password" "${servercfgfullpath}" | awk -F '=' '{print $2}') + adminpassword=$(grep "Admin_Password" "${servercfgfullpath}" | awk -F '=' '{print $2}') + fi +} + # ARK: Survival Evolved if [ "${shortname}" == "ark" ]; then fn_info_config_ark @@ -1296,6 +1308,9 @@ elif [ "${shortname}" == "rw" ]; then # Serious Sam elif [ "${shortname}" == "ss3" ]; then fn_info_config_seriousengine35 +# Soldat +elif [ "${shortname}" == "soldat" ]; then + fn_info_config_soldat # Soldier Of Fortune 2: Gold Edition elif [ "${shortname}" == "sof2" ]; then fn_info_config_sof2 diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 270caaadde..c390d45c96 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -501,7 +501,7 @@ fn_info_message_ports(){ fi done # engines/games that require editing the parms - local ports_edit_array=( "goldsource" "Factorio" "Hurtworld" "iw3.0" "ioquake3" "Rust" "spark" "source" "starbound" "unreal4" "realvirtuality" "Unturned") + local ports_edit_array=( "goldsource" "Factorio" "Hurtworld" "iw3.0" "ioquake3" "Rust" "spark" "source" "starbound" "unreal4" "realvirtuality" "Unturned" "Soldat" ) for port_edit in "${ports_edit_array[@]}" do if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]||[ "${shortname}" == "${port_edit}" ]; then @@ -1215,6 +1215,16 @@ fn_info_message_barotrauma(){ } | column -s $'\t' -t } +fn_info_message_soldat() { + echo "netstat -atunp | grep soldat" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> RCON\tINBOUND\t${port}\ttcp" + echo -e "> FILES\tINBOUND\t$((port+10))\ttcp" + } | column -s $'\t' -t +} fn_info_message_select_engine(){ # Display details depending on game or engine. @@ -1272,6 +1282,8 @@ fn_info_message_select_engine(){ fn_info_message_squad elif [ "${gamename}" == "Stationeers" ]; then fn_info_message_stationeers + elif [ "${gamename}" == "Soldat" ]; then + fn_info_message_soldat elif [ "${shortname}" == "sbots" ]; then fn_info_message_sbots elif [ "${gamename}" == "TeamSpeak 3" ]; then diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index f21924c927..c5ab6ddb81 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -157,6 +157,14 @@ fn_info_parms_sof2(){ defaultmap=${defaultmap:-"NOT SET"} } +fn_info_parms_soldat(){ + port=${port:-"0"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} +} + fn_info_parms_towerunite(){ port=${port:-"0"} queryport=${queryport:-"0"} @@ -239,6 +247,8 @@ elif [ "${shortname}" == "sof2" ]; then # Sticky Bots elif [ "${shortname}" == "sbots" ]; then fn_info_parms_stickybots +elif [ "${shortname}" == "soldat" ]; then + fn_info_parms_soldat # Serious Sam elif [ "${shortname}" == "ss3" ]; then fn_info_parms_seriousengine35 diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 56d8325f31..70e7e07b7f 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -549,6 +549,12 @@ elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars +elif [ "${gamename}" == "Soldat" ]; then + gamedirname="Soldat" + array_configs+=( soldat.ini ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars elif [ "${gamename}" == "Soldier Of Fortune 2: Gold Edition" ]; then gamedirname="SoldierOfFortune2Gold" array_configs+=( server.cfg mapcycle.txt) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 22452582a6..a8e9a47a5a 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -57,6 +57,8 @@ fn_install_server_files(){ remote_fileurl="https://files.linuxgsm.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; local_filedir="${tmpdir}"; local_filename="enemy-territory.260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7" elif [ "${shortname}" == "samp" ]; then remote_fileurl="https://files.sa-mp.com/samp037svr_R2-1.tar.gz"; local_filedir="${tmpdir}"; local_filename="samp037svr_R2-1.tar.gz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="93705e165550c97484678236749198a4" + elif [ "${shortname}" == "soldat" ]; then + remote_fileurl="https://static.soldat.pl/downloads/soldatserver2.8.1_1.7.1.zip"; local_filedir="${tmpdir}"; local_filename="soldatserver2.8.1_1.7.1.zip"; chmodx="nochmodx" run="norun"; force="noforce"; md5="994409c28520425965dec5c71ccb55e1" fi fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" fn_dl_extract "${local_filedir}" "${local_filename}" "${serverfiles}" @@ -155,7 +157,7 @@ elif [ "${shortname}" == "mta" ]; then elif [ "${shortname}" == "fctr" ]; then update_factorio.sh install_factorio_save.sh -elif [ -z "${appid}" ]||[ "${shortname}" == "ges" ]||[ "${shortname}" == "bd" ]||[ "${shortname}" == "bb" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "ts" ]||[ "${shortname}" == "vs" ]; then +elif [ -z "${appid}" ]||[ "${shortname}" == "ges" ]||[ "${shortname}" == "bd" ]||[ "${shortname}" == "bb" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "ts" ]||[ "${shortname}" == "vs" ]||[ "${shortname}" == "soldat" ]; then if [ "${shortname}" == "ut" ]; then install_eula.sh fi From db3da278b52995bd8184a8cba72db8dbc82e361b Mon Sep 17 00:00:00 2001 From: h3o66 Date: Sat, 24 Aug 2019 23:43:47 +0200 Subject: [PATCH 02/18] add query port for info params --- lgsm/functions/info_parms.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index c5ab6ddb81..c97267eca7 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -159,6 +159,7 @@ fn_info_parms_sof2(){ fn_info_parms_soldat(){ port=${port:-"0"} + queryport=${port} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} From d196e5726bfc4040f7dbc0af5e07f0bca1671732 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 25 Aug 2019 14:39:19 +0100 Subject: [PATCH 03/18] Added soldat to gamedig --- lgsm/functions/query_gamedig.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 56d55206f5..7b9097f340 100644 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -62,6 +62,14 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; fi done + local shortname_query_arra=( soldat ) + for engine_query in "${engine_query_array[@]}" + do + if [ "${engine_query}" == "${engine}" ]; then + gamedigengine="soldat" + fi + done + local shortname_query_array=( ts3 ) for shortname_query in "${shortname_query_array[@]}" do From 6aa3ec75875cc5e4735dbb7fa3777ab04714563c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 25 Aug 2019 15:25:26 +0100 Subject: [PATCH 04/18] add soldat query --- lgsm/functions/command_monitor.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 56b8ecf53d..e1b2995589 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -133,7 +133,7 @@ fn_monitor_check_session(){ fn_monitor_query(){ fn_script_log_info "Querying port: query enabled" # Engines that work with query. - local allowed_engines_array=( avalanche2.0 avalanche3.0 barotrauma goldsource idtech2 idtech3 idtech3_ql ioquake3 iw2.0 iw3.0 lwjgl2 madness quake refractor realvirtuality source spark starbound unity3d unreal unreal2 unreal4 wurm ) + local allowed_engines_array=( avalanche2.0 avalanche3.0 barotrauma goldsource idtech2 idtech3 idtech3_ql ioquake3 iw2.0 iw3.0 lwjgl2 madness quake refractor realvirtuality source spark soldat starbound unity3d unreal unreal2 unreal4 wurm ) for allowed_engine in "${allowed_engines_array[@]}" do if [ "${allowed_engine}" == "${engine}" ]; then @@ -143,10 +143,12 @@ fn_monitor_query(){ local engine="unreal4" fi - # Will first attempt to use gamedig then gsquery. + # Will loop though supported query methods until one passes. totalseconds=0 if [ "${shortname}" == "wurm" ]; then local query_methods_array=( gsquery ) + elif [ "${shortname}" == "soldat" ]; then + local query_methods_array=( gamedig udp ) else local query_methods_array=( gamedig gsquery ) fi @@ -160,6 +162,10 @@ fn_monitor_query(){ fn_monitor_loop fi fi + elif [ "${query_method}" == "udp" ]; then + fn_monitor_query_udp + elif [ "${query_method}" == "tcp" ]; then + fn_monitor_query_tcp else if [ -z "${monitorpass}" ]; then querymethod="${query_method}" From 284f5a5304cdf1e43e482d4ff5cde4ab9cf6ce35 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 25 Aug 2019 15:27:02 +0100 Subject: [PATCH 05/18] corrected function name --- lgsm/functions/command_monitor.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index e1b2995589..31cc52a694 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -182,7 +182,7 @@ fn_monitor_query_tcp(){ fn_monitor_loop } -fn_monitor_query_upd(){ +fn_monitor_query_udp(){ querymethod="upd" fn_monitor_loop } From 698ccd3495b71b9bf6fb5cb02b4f62dfa8a16744 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 25 Aug 2019 15:32:07 +0100 Subject: [PATCH 06/18] bug --- lgsm/functions/query_gamedig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 7b9097f340..9bfd186857 100644 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -62,7 +62,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; fi done - local shortname_query_arra=( soldat ) + local shortname_query_array=( soldat ) for engine_query in "${engine_query_array[@]}" do if [ "${engine_query}" == "${engine}" ]; then From 6bd382812d89b478e901984435b38ccf32eb9f62 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 25 Aug 2019 15:34:26 +0100 Subject: [PATCH 07/18] added soldat --- lgsm/functions/query_gamedig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 9bfd186857..b64d027b5d 100644 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -14,7 +14,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; local engine="unreal4" fi - local engine_query_array=( avalanche3.0 barotrauma madness quakelive realvirtuality refractor source goldsource spark starbound unity3d unreal4 wurm ) + local engine_query_array=( avalanche3.0 barotrauma goldsource madness quakelive realvirtuality refractor source soldat spark starbound unity3d unreal4 wurm ) for engine_query in "${engine_query_array[@]}" do if [ "${engine_query}" == "${engine}" ]; then From 70e7d83ea51c7258ecaed801f63b1ebcc3f50e9a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 25 Aug 2019 15:34:26 +0100 Subject: [PATCH 08/18] Revert "added soldat" This reverts commit 6bd382812d89b478e901984435b38ccf32eb9f62. --- lgsm/functions/query_gamedig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index b64d027b5d..9bfd186857 100644 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -14,7 +14,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; local engine="unreal4" fi - local engine_query_array=( avalanche3.0 barotrauma goldsource madness quakelive realvirtuality refractor source soldat spark starbound unity3d unreal4 wurm ) + local engine_query_array=( avalanche3.0 barotrauma madness quakelive realvirtuality refractor source goldsource spark starbound unity3d unreal4 wurm ) for engine_query in "${engine_query_array[@]}" do if [ "${engine_query}" == "${engine}" ]; then From cbcd75e3273f0136a604fc37fc540baa907d49dd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 25 Aug 2019 15:40:57 +0100 Subject: [PATCH 09/18] changed shortname to sol --- lgsm/data/serverlist.csv | 2 +- lgsm/functions/command_monitor.sh | 2 +- lgsm/functions/command_stop.sh | 2 +- lgsm/functions/info_config.sh | 2 +- lgsm/functions/info_messages.sh | 2 +- lgsm/functions/info_parms.sh | 2 +- lgsm/functions/install_server_files.sh | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index ad1ec1b09d..2b3567314d 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -74,7 +74,7 @@ samp,sampserver,San Andreas Multiplayer sbots,sbotsserver, StickyBots sfc,sfcserver,SourceForts Classic sof2,sof2server,Soldier Of Fortune 2: Gold Edition -soldat,sserver,Soldat +sol,solserver,Soldat ss3,ss3server,Serious Sam 3: BFE sb,sbserver,Starbound st,stserver,Stationeers diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 31cc52a694..ed2339da95 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -147,7 +147,7 @@ fn_monitor_query(){ totalseconds=0 if [ "${shortname}" == "wurm" ]; then local query_methods_array=( gsquery ) - elif [ "${shortname}" == "soldat" ]; then + elif [ "${shortname}" == "sol" ]; then local query_methods_array=( gamedig udp ) else local query_methods_array=( gamedig gsquery ) diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 03dd84a25b..3aae20992e 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -195,7 +195,7 @@ fn_stop_graceful_select(){ fn_stop_graceful_cmd "quit" 120 elif [ "${engine}" == "goldsource" ]; then fn_stop_graceful_goldsource - elif [ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal4" ]||[ "${engine}" == "unreal3" ]||[ "${engine}" == "unreal2" ]||[ "${engine}" == "unreal" ]||[ "${shortname}" == "fctr" ]||[ "${shortname}" == "mumble" ]||[ "${shortname}" == "wurm" ]||[ "${shortname}" == "jc2" ]||[ "${shortname}" == "jc3" ]||[ "${shortname}" == "soldat" ]; then + elif [ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal4" ]||[ "${engine}" == "unreal3" ]||[ "${engine}" == "unreal2" ]||[ "${engine}" == "unreal" ]||[ "${shortname}" == "fctr" ]||[ "${shortname}" == "mumble" ]||[ "${shortname}" == "wurm" ]||[ "${shortname}" == "jc2" ]||[ "${shortname}" == "jc3" ]||[ "${shortname}" == "sol" ]; then fn_stop_graceful_ctrlc elif [ "${engine}" == "source" ]||[ "${engine}" == "quake" ]||[ "${engine}" == "idtech2" ]||[ "${engine}" == "idtech3" ]||[ "${engine}" == "idtech3_ql" ]||[ "${shortname}" == "pz" ]||[ "${shortname}" == "rw" ]; then fn_stop_graceful_cmd "quit" 30 diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index ee634105f5..15d91de7e1 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -1309,7 +1309,7 @@ elif [ "${shortname}" == "rw" ]; then elif [ "${shortname}" == "ss3" ]; then fn_info_config_seriousengine35 # Soldat -elif [ "${shortname}" == "soldat" ]; then +elif [ "${shortname}" == "sol" ]; then fn_info_config_soldat # Soldier Of Fortune 2: Gold Edition elif [ "${shortname}" == "sof2" ]; then diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 04351a47a4..723ec880df 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -1282,7 +1282,7 @@ fn_info_message_select_engine(){ fn_info_message_squad elif [ "${gamename}" == "Stationeers" ]; then fn_info_message_stationeers - elif [ "${gamename}" == "Soldat" ]; then + elif [ "${shortname}" == "sol" ]; then fn_info_message_soldat elif [ "${shortname}" == "sbots" ]; then fn_info_message_sbots diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index c97267eca7..f902f2e23e 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -248,7 +248,7 @@ elif [ "${shortname}" == "sof2" ]; then # Sticky Bots elif [ "${shortname}" == "sbots" ]; then fn_info_parms_stickybots -elif [ "${shortname}" == "soldat" ]; then +elif [ "${shortname}" == "sol" ]; then fn_info_parms_soldat # Serious Sam elif [ "${shortname}" == "ss3" ]; then diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 0643363ccb..3de499a4c5 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -59,7 +59,7 @@ fn_install_server_files(){ remote_fileurl="https://files.linuxgsm.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; local_filedir="${tmpdir}"; local_filename="enemy-territory.260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7" elif [ "${shortname}" == "samp" ]; then remote_fileurl="https://files.sa-mp.com/samp037svr_R2-1.tar.gz"; local_filedir="${tmpdir}"; local_filename="samp037svr_R2-1.tar.gz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="93705e165550c97484678236749198a4" - elif [ "${shortname}" == "soldat" ]; then + elif [ "${shortname}" == "sol" ]; then remote_fileurl="https://static.soldat.pl/downloads/soldatserver2.8.1_1.7.1.zip"; local_filedir="${tmpdir}"; local_filename="soldatserver2.8.1_1.7.1.zip"; chmodx="nochmodx" run="norun"; force="noforce"; md5="994409c28520425965dec5c71ccb55e1" elif [ "${shortname}" == "zmr" ]; then remote_fileurl="https://files.linuxgsm.com/ZombieMasterReborn/zombie_master_reborn_b4_fix5.1.tar.bz2"; local_filedir="${tmpdir}"; local_filename="zombie_master_reborn_b4_fix5.1.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="73472bd84dfa6d203f3b5f48f760773e" @@ -161,7 +161,7 @@ elif [ "${shortname}" == "mta" ]; then elif [ "${shortname}" == "fctr" ]; then update_factorio.sh install_factorio_save.sh -elif [ -z "${appid}" ]||[ "${shortname}" == "ahl" ]||[ "${shortname}" == "bd" ]||[ "${shortname}" == "bb" ]||[ "${shortname}" == "ges" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "soldat" ]||[ "${shortname}" == "ts" ]||[ "${shortname}" == "vs" ]||[ "${shortname}" == "zmr" ]; then +elif [ -z "${appid}" ]||[ "${shortname}" == "ahl" ]||[ "${shortname}" == "bd" ]||[ "${shortname}" == "bb" ]||[ "${shortname}" == "ges" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "sol" ]||[ "${shortname}" == "ts" ]||[ "${shortname}" == "vs" ]||[ "${shortname}" == "zmr" ]; then if [ "${shortname}" == "ut" ]; then install_eula.sh fi From 4374ef1f3fe429a1d921839b59f4ce8f2b7ad0bb Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 25 Aug 2019 15:42:45 +0100 Subject: [PATCH 10/18] xhanged server name --- .../config-lgsm/{sserver => solserver}/_default.cfg | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lgsm/config-default/config-lgsm/{sserver => solserver}/_default.cfg (100%) diff --git a/lgsm/config-default/config-lgsm/sserver/_default.cfg b/lgsm/config-default/config-lgsm/solserver/_default.cfg similarity index 100% rename from lgsm/config-default/config-lgsm/sserver/_default.cfg rename to lgsm/config-default/config-lgsm/solserver/_default.cfg From d2b5fa521429ae61e201e7fed452912bd73a3384 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 25 Aug 2019 15:48:21 +0100 Subject: [PATCH 11/18] changed soldat shortname --- lgsm/functions/query_gamedig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 9bfd186857..7c5dbdd056 100644 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -62,7 +62,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; fi done - local shortname_query_array=( soldat ) + local shortname_query_array=( sol ) for engine_query in "${engine_query_array[@]}" do if [ "${engine_query}" == "${engine}" ]; then From f6ea9e5d9f1d13e2391ba1938ceb9d0b509cba46 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 25 Aug 2019 15:51:16 +0100 Subject: [PATCH 12/18] correct array --- lgsm/functions/query_gamedig.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 7c5dbdd056..a708b38ac6 100644 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -63,9 +63,9 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; done local shortname_query_array=( sol ) - for engine_query in "${engine_query_array[@]}" + for shortname_query in "${shortname_query_array[@]}" do - if [ "${engine_query}" == "${engine}" ]; then + if [ "${shortname_query}" == "${shortname}" ]; then gamedigengine="soldat" fi done From 035912e3460bcfe33c7c4ddd02c21dcd874ac876 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 25 Aug 2019 16:08:37 +0100 Subject: [PATCH 13/18] removed gamedig as not working --- lgsm/functions/command_monitor.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index ed2339da95..fd130f6354 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -133,7 +133,7 @@ fn_monitor_check_session(){ fn_monitor_query(){ fn_script_log_info "Querying port: query enabled" # Engines that work with query. - local allowed_engines_array=( avalanche2.0 avalanche3.0 barotrauma goldsource idtech2 idtech3 idtech3_ql ioquake3 iw2.0 iw3.0 lwjgl2 madness quake refractor realvirtuality source spark soldat starbound unity3d unreal unreal2 unreal4 wurm ) + local allowed_engines_array=( avalanche2.0 avalanche3.0 barotrauma goldsource idtech2 idtech3 idtech3_ql ioquake3 iw2.0 iw3.0 lwjgl2 madness quake refractor realvirtuality source spark starbound unity3d unreal unreal2 unreal4 wurm ) for allowed_engine in "${allowed_engines_array[@]}" do if [ "${allowed_engine}" == "${engine}" ]; then @@ -215,6 +215,8 @@ if [ "${shortname}" == "sb" ]; then fi elif [ "${shortname}" == "ts3" ]||[ "${shortname}" == "eco" ]||[ "${shortname}" == "mumble" ]; then fn_monitor_query_tcp +elif [ "${shortname}" == "sol" ]; then + fn_monitor_query_tcp else fn_monitor_query fi From dbffec4954c3af52428cb84449260328422bd476 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 25 Aug 2019 16:10:01 +0100 Subject: [PATCH 14/18] changed to udp --- lgsm/functions/command_monitor.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index fd130f6354..62085aea88 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -216,7 +216,7 @@ if [ "${shortname}" == "sb" ]; then elif [ "${shortname}" == "ts3" ]||[ "${shortname}" == "eco" ]||[ "${shortname}" == "mumble" ]; then fn_monitor_query_tcp elif [ "${shortname}" == "sol" ]; then - fn_monitor_query_tcp + fn_monitor_query_udp else fn_monitor_query fi From 914f2e114f504d259374cd8d0a321b61c779aaf4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 25 Aug 2019 16:16:17 +0100 Subject: [PATCH 15/18] query currently not working. --- lgsm/functions/command_monitor.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 62085aea88..ed2339da95 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -133,7 +133,7 @@ fn_monitor_check_session(){ fn_monitor_query(){ fn_script_log_info "Querying port: query enabled" # Engines that work with query. - local allowed_engines_array=( avalanche2.0 avalanche3.0 barotrauma goldsource idtech2 idtech3 idtech3_ql ioquake3 iw2.0 iw3.0 lwjgl2 madness quake refractor realvirtuality source spark starbound unity3d unreal unreal2 unreal4 wurm ) + local allowed_engines_array=( avalanche2.0 avalanche3.0 barotrauma goldsource idtech2 idtech3 idtech3_ql ioquake3 iw2.0 iw3.0 lwjgl2 madness quake refractor realvirtuality source spark soldat starbound unity3d unreal unreal2 unreal4 wurm ) for allowed_engine in "${allowed_engines_array[@]}" do if [ "${allowed_engine}" == "${engine}" ]; then @@ -215,8 +215,6 @@ if [ "${shortname}" == "sb" ]; then fi elif [ "${shortname}" == "ts3" ]||[ "${shortname}" == "eco" ]||[ "${shortname}" == "mumble" ]; then fn_monitor_query_tcp -elif [ "${shortname}" == "sol" ]; then - fn_monitor_query_udp else fn_monitor_query fi From 17f6d8a4e3637290a236779f96ac8c3b3a4a3b9b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 25 Aug 2019 16:20:39 +0100 Subject: [PATCH 16/18] reverting to session check only --- lgsm/functions/command_monitor.sh | 8 +------- lgsm/functions/query_gamedig.sh | 8 -------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index ed2339da95..43a5cce911 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -143,12 +143,10 @@ fn_monitor_query(){ local engine="unreal4" fi - # Will loop though supported query methods until one passes. + # Will first attempt to use gamedig then gsquery. totalseconds=0 if [ "${shortname}" == "wurm" ]; then local query_methods_array=( gsquery ) - elif [ "${shortname}" == "sol" ]; then - local query_methods_array=( gamedig udp ) else local query_methods_array=( gamedig gsquery ) fi @@ -162,10 +160,6 @@ fn_monitor_query(){ fn_monitor_loop fi fi - elif [ "${query_method}" == "udp" ]; then - fn_monitor_query_udp - elif [ "${query_method}" == "tcp" ]; then - fn_monitor_query_tcp else if [ -z "${monitorpass}" ]; then querymethod="${query_method}" diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index a708b38ac6..56d55206f5 100644 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -62,14 +62,6 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; fi done - local shortname_query_array=( sol ) - for shortname_query in "${shortname_query_array[@]}" - do - if [ "${shortname_query}" == "${shortname}" ]; then - gamedigengine="soldat" - fi - done - local shortname_query_array=( ts3 ) for shortname_query in "${shortname_query_array[@]}" do From c7e92466447ec4c65aa3f0a5c79b0250acb4733c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 25 Aug 2019 18:27:30 +0100 Subject: [PATCH 17/18] removed soldat --- lgsm/functions/command_monitor.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 43a5cce911..dca5fc964a 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -133,7 +133,7 @@ fn_monitor_check_session(){ fn_monitor_query(){ fn_script_log_info "Querying port: query enabled" # Engines that work with query. - local allowed_engines_array=( avalanche2.0 avalanche3.0 barotrauma goldsource idtech2 idtech3 idtech3_ql ioquake3 iw2.0 iw3.0 lwjgl2 madness quake refractor realvirtuality source spark soldat starbound unity3d unreal unreal2 unreal4 wurm ) + local allowed_engines_array=( avalanche2.0 avalanche3.0 barotrauma goldsource idtech2 idtech3 idtech3_ql ioquake3 iw2.0 iw3.0 lwjgl2 madness quake refractor realvirtuality source spark starbound unity3d unreal unreal2 unreal4 wurm ) for allowed_engine in "${allowed_engines_array[@]}" do if [ "${allowed_engine}" == "${engine}" ]; then From 8e0d97ee59591449874f32de039d9c025b34995a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 25 Aug 2019 18:40:42 +0100 Subject: [PATCH 18/18] alphabetical --- lgsm/functions/info_messages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 723ec880df..b7cb76704a 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -501,7 +501,7 @@ fn_info_message_ports(){ fi done # engines/games that require editing the parms - local ports_edit_array=( "goldsource" "Factorio" "Hurtworld" "iw3.0" "ioquake3" "Rust" "spark" "source" "starbound" "unreal4" "realvirtuality" "Unturned" "Soldat" ) + local ports_edit_array=( "goldsource" "Factorio" "Hurtworld" "iw3.0" "ioquake3" "Rust" "Soldat" "spark" "source" "starbound" "unreal4" "realvirtuality" "Unturned" ) for port_edit in "${ports_edit_array[@]}" do if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]||[ "${shortname}" == "${port_edit}" ]; then