diff --git a/lgsm/config-default/config-lgsm/solserver/_default.cfg b/lgsm/config-default/config-lgsm/solserver/_default.cfg new file mode 100644 index 0000000000..96e8b789e6 --- /dev/null +++ b/lgsm/config-default/config-lgsm/solserver/_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 bf922e5955..2b3567314d 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -74,6 +74,7 @@ samp,sampserver,San Andreas Multiplayer sbots,sbotsserver, StickyBots sfc,sfcserver,SourceForts Classic sof2,sof2server,Soldier Of Fortune 2: Gold Edition +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 56b8ecf53d..dca5fc964a 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -176,7 +176,7 @@ fn_monitor_query_tcp(){ fn_monitor_loop } -fn_monitor_query_upd(){ +fn_monitor_query_udp(){ querymethod="upd" fn_monitor_loop } diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index ad3b648823..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" ]; 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 275fb54f26..15d91de7e1 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}" == "sol" ]; 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 0754ee232e..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") + 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 @@ -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 [ "${shortname}" == "sol" ]; 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..f902f2e23e 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -157,6 +157,15 @@ fn_info_parms_sof2(){ defaultmap=${defaultmap:-"NOT SET"} } +fn_info_parms_soldat(){ + port=${port:-"0"} + queryport=${port} + 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 +248,8 @@ elif [ "${shortname}" == "sof2" ]; then # Sticky Bots elif [ "${shortname}" == "sbots" ]; then fn_info_parms_stickybots +elif [ "${shortname}" == "sol" ]; 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 8f991d5178..1adeeb7442 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -555,6 +555,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 7e6e45b30f..3de499a4c5 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -59,6 +59,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}" == "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" fi @@ -159,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}" == "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