diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000..d05c374dc --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: dgibbs # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: https://www.paypal.me/dgibbs64 # Replace with a single custom sponsorship URL diff --git a/.github/issue_label_bot.yaml b/.github/issue_label_bot.yaml new file mode 100644 index 000000000..ee6d724f1 --- /dev/null +++ b/.github/issue_label_bot.yaml @@ -0,0 +1,4 @@ +label-alias: + bug: 'type: bug' + feature_request: 'type: feature request' + question: 'question' diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg new file mode 100644 index 000000000..ed8650e16 --- /dev/null +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -0,0 +1,133 @@ +################################## +######## 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 Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +fn_parms(){ +parms="" +} + +#### 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="" + +## 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" + +#### LinuxGSM Advanced Settings #### + +# ANSI Colors +ansi="on" + +# Message Display Time +sleeptime="0.5" + +## SteamCMD Settings +# Server appid +appid="1026340" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="true" + +## LinuxGSM Server Details +# Do not edit +gamename="Barotrauma" +engine="barotrauma" +glibc="2.17" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${serverfiles}" +executabledir="${systemdir}" +executable="./DedicatedServer" +servercfg="serversettings.xml" +servercfgdefault="serversettings.xml" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/ServerLogs" +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/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index 2913f0ea8..b65a45510 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -102,7 +102,7 @@ sleeptime="0.5" ## SteamCMD Settings # Server appid -appid="304930" +appid="1110390" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server @@ -120,7 +120,7 @@ glibc="2.15" ## Server Specific Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -executable="./Unturned_Headless.x86" +executable="./Unturned_Headless.x86_64" servercfgdir="${systemdir}/Servers/${servicename}" servercfg="Config.json" servercfgdefault="Config.json" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 8d3f4ebd6..76bd58e28 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -8,6 +8,7 @@ bmdm,bmdmserver,Black Mesa: Deathmatch bs,bsserver,Blade Symphony bb,bbserver,BrainBread bb2,bb2server,BrainBread 2 +bt,btserver,Barotrauma bt1944,bt1944server,Battalion 1944 cod,codserver,Call of Duty cod2,cod2server,Call of Duty 2 diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index 77dfd1b5b..7108b16c1 100644 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -149,7 +149,7 @@ fn_sys_perm_errors_detect(){ sysdirpermerror="0" classdirpermerror="0" netdirpermerror="0" - # Check permissions/ + # Check permissions. # /sys, /sys/class and /sys/class/net should be readable & executable. if [ ! -r "/sys" ]||[ ! -x "/sys" ]; then sysdirpermerror="1" diff --git a/lgsm/functions/check_system_requirements.sh b/lgsm/functions/check_system_requirements.sh index bc2317f48..1493f6b85 100644 --- a/lgsm/functions/check_system_requirements.sh +++ b/lgsm/functions/check_system_requirements.sh @@ -15,6 +15,9 @@ info_distro.sh if [ "${shortname}" == "ark" ]; then ramrequirementmb="4000" ramrequirementgb="4" +elif [ "${shortname}" == "bt" ]; then + ramrequirementmb="1000" + ramrequirementgb="1" elif [ "${shortname}" == "mh" ]; then ramrequirementmb="4000" ramrequirementgb="4" diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index c1192a60a..2bc534d69 100644 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -32,7 +32,7 @@ else # Configuration. install_config.sh - if [ -v "${gslt}" ]; then + if [ -v gslt ]; then install_gslt.sh elif [ "${shortname}" == "dst" ]; then install_dst_token.sh diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 772be28a9..56b8ecf53 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -18,7 +18,7 @@ for queryattempt in {1..5}; do fn_print_dots "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_querying_eol fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : QUERYING" - if [ "$(cat "${rootdir}/${lockselfname}")" > "$(date "+%s" -d "${querydelay} mins ago")" ]; then + if [ "$(cat "${rootdir}/${lockselfname}")" -gt "$(date "+%s" -d "${querydelay} mins ago")" ]; then fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_delay_eol fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : DELAY" @@ -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 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 starbound unity3d unreal unreal2 unreal4 wurm ) for allowed_engine in "${allowed_engines_array[@]}" do if [ "${allowed_engine}" == "${engine}" ]; then diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index ed7d98498..afaa82326 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -28,8 +28,8 @@ fn_start_teamspeak3(){ if [ -f "${lgsmlog}" ]; then mv "${lgsmlog}" "${lgsmlogdate}" fi - # Create lockfile. + # Create lockfile. date '+%s' > "${rootdir}/${lockselfname}" # Accept license. if [ ! -f "${executabledir}/.ts3server_license_accepted" ]; then diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index e252bc7f6..63b65db29 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -24,8 +24,6 @@ fn_validation(){ if [ "${appid}" == "90" ]; then ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_info_print 70 +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} +app_update "${appid}" ${branch} validate +quit | tee -a "${lgsmlog}" - elif [ "${gamename}" == "Unturned" ]; then - ${unbuffer} ./steamcmd.sh +@sSteamCmdForcePlatformBitness 32 +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} validate +quit elif [ "${gamename}" == "Jedi Knight II: Jedi Outcast" ]; ${unbuffer} ./steamcmd.sh +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} validate +quit| tee -a "${scriptlog}" else diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh index a3f60e89c..eb1622978 100644 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/functions/fix_steamcmd.sh @@ -17,7 +17,15 @@ if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then fn_fix_msg_end fi -if [ "${shortname}" == "ss3" ]; then +if [ "${shortname}" == "bt" ]; then + # Fixes: [S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed. + if [ ! -L "${executabledir}/lib64/steamclient.so" ]; then + fixname="steamclient.so x86_64" + fn_fix_msg_start + cp -s -v "${steamcmddir}/linux64/steamclient.so" "${executabledir}/lib64/steamclient.so" >> "${lgsmlog}" + fn_fix_msg_end + fi +elif [ "${shortname}" == "ss3" ]; then # Fixes: .steam/bin32/libsteam.so: cannot open shared object file: No such file or directory if [ ! -f "${HOME}/.steam/bin32/libsteam.so" ]; then fixname="libsteam.so" diff --git a/lgsm/functions/fix_unt.sh b/lgsm/functions/fix_unt.sh index bc29a54ed..3c9c9335a 100644 --- a/lgsm/functions/fix_unt.sh +++ b/lgsm/functions/fix_unt.sh @@ -7,5 +7,5 @@ local commandname="FIX" local commandaction="Fix" -# Fixes: [Raknet] Server Shutting Down (Shutting Down). -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${systemdir}/lib" +# steamclient.so: cannot open shared object file: No such file or directory +export LD_LIBRARY_PATH="${serverfiles}/linux64:${serverfiles}:$LD_LIBRARY_PATH" diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index c9be1af93..a07b2bc22 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -110,6 +110,29 @@ fn_info_config_ballistic_overkill(){ fi } +fn_info_config_barotrauma(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + port="${zero}" + queryport="${zero}" + maxplayers="${unavailable}" + else + servername=$(grep -Po 'name="\K.*(?=")' "${servercfgfullpath}") # Assuming GNU grep is used + serverpassword=$(grep -Po 'password="\K.*(?=")' "${servercfgfullpath}") # Assuming GNU grep is used + port=$(grep " port=" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$(grep "queryport=" "${servercfgfullpath}" | tr -cd '[:digit:]') + maxplayers=$(grep "maxplayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + maxplayers=${maxplayers:-"0"} + fi +} + fn_info_config_battalion1944(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1215,6 +1238,9 @@ if [ "${shortname}" == "ark" ]; then # Ballistic Overkill elif [ "${shortname}" == "bo" ]; then fn_info_config_ballistic_overkill +# Barotrauma +elif [ "${shortname}" == "bt" ]; then + fn_info_config_barotrauma # Battalion 1944 elif [ "${shortname}" == "bt1944" ]; then fn_info_config_battalion1944 diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index d8f7abd63..270caaadd 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -1205,6 +1205,17 @@ fn_info_message_mordhau(){ } | column -s $'\t' -t } +fn_info_message_barotrauma(){ + echo "netstat -atunp | grep /./DedicatedSer" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> Query\tINBOUND\t$((port+1))\tudp" + } | column -s $'\t' -t +} + + fn_info_message_select_engine(){ # Display details depending on game or engine. if [ "${gamename}" == "7 Days To Die" ]; then @@ -1213,6 +1224,8 @@ fn_info_message_select_engine(){ fn_info_message_ark elif [ "${gamename}" == "Ballistic Overkill" ]; then fn_info_message_ballisticoverkill + elif [ "${gamename}" == "Barotrauma" ]; then + fn_info_message_barotrauma elif [ "${gamename}" == "Battalion 1944" ]; then fn_info_message_battalion1944 elif [ "${gamename}" == "Call of Duty" ]; then diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 7b080036d..f21924c92 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -22,6 +22,11 @@ fn_info_parms_ark(){ maxplayers=${maxplayers:-"0"} } +fn_info_parms_barotrauma(){ + port=${port:-"0"} + queryport=${queryport:-"0"} +} + fn_info_parms_realvirtuality(){ port=${port:-"0"} queryport=$((port + 1)) @@ -197,6 +202,9 @@ if [ "${shortname}" == "ark" ]; then # ARMA 3 elif [ "${shortname}" == "arma3" ]; then fn_info_parms_realvirtuality +# Barotrauma +elif [ "${shortname}" == "bt" ]; then + fn_info_parms_barotrauma # Call of Duty elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]||[ "${engine}" == "iw2.0" ]||[ "${engine}" == "iw3.0" ]; then fn_info_parms_cod diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 29c6aabdf..7aded2ae5 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -173,6 +173,13 @@ elif [ "${gamename}" == "Base Defense" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars +elif [ "${gamename}" == "Barotrauma" ]; then + gamedirname="Barotrauma" + fn_check_cfgdir + array_configs+=( serversettings.xml ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars elif [ "${gamename}" == "Battalion 1944" ]; then gamedirname="Battalion1944" fn_check_cfgdir diff --git a/lgsm/functions/install_ut2k4_key.sh b/lgsm/functions/install_ut2k4_key.sh index 0f0fe6da5..79066167e 100644 --- a/lgsm/functions/install_ut2k4_key.sh +++ b/lgsm/functions/install_ut2k4_key.sh @@ -14,7 +14,7 @@ echo "=================================" fn_sleep_time echo "To get your server listed on the Master Server list" echo "you must get a free CD key. Get a key here:" -echo "https://forums.unrealtournament.com/utserver/cdkey.php?2004" +echo "https://www.epicgames.com/unrealtournament/forums/cdkey.php?2004" echo "" if [ -z "${autoinstall}" ]; then echo "Once you have the key enter it below" @@ -28,4 +28,4 @@ else echo "You can add your key using the following command" echo "./${selfname} server-cd-key" fi -echo "" \ No newline at end of file +echo "" diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 30e436a53..d2e18d6bf 100644 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -146,6 +146,46 @@ fn_mod_tidy_files_list(){ sed -i "/^addons\/metamod$/d" "${modsdir}/${modcommand}-files.txt" sed -i "/^addons\/metamod\/sourcemod.vdf$/d" "${modsdir}/${modcommand}-files.txt" fi + + # Remove common paths from deletion list (Add your sourcemod mod here) + if [ "${modcommand}" == "gokz" ] || [ "${modcommand}" == "ttt" ] || [ "${modcommand}" == "steamworks" ] || [ "${modcommand}" == "get5" ]; then + sed -i "/^addons\/sourcemod$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/configs$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/extensions$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/logs$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/plugins$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/plugins\/disabled$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/translations$/d" "${modsdir}/${modcommand}-files.txt" + # Don't delete directories of translations like 'fr', 'sv', 'de', etc + sed -i "/^addons\/sourcemod\/translations\/[A-Za-z0-9_]*$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^cfg\/sourcemod$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^maps$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^materialss$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^materials\/models$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^materials\/models\/weapons$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^materials\/darkness$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^materials\/decals$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^materials\/overlays$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^models$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^models\/weapons$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^sound$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^sound\/weapons$/d" "${modsdir}/${modcommand}-files.txt" + fi + + # Remove paths of specific mods from deletion list + if [ "${modcommand}" == "gokz" ]; then + sed -i "/^addons\/sourcemod\/scripting\/include\/smjansson.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/GlobalAPI-Core.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/sourcebanspp.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/autoexecconfig.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/colorvariables.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/movementapi.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/movement.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/dhooks.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/updater.inc$/d" "${modsdir}/${modcommand}-files.txt" + fi } ## Information Gathering. diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index eb1e2f8bf..c0d240e41 100644 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -26,6 +26,16 @@ sourcemodscrapeurl="https://sm.alliedmods.net/smdrop/${sourcemodmversion}/source sourcemodlatestfile="$(wget "${sourcemodscrapeurl}" -q -O -)" sourcemoddownloadurl="https://www.sourcemod.net/latest.php?os=linux&version=${sourcemodmversion}" sourcemodurl="${sourcemoddownloadurl}" +# Steamworks +steamworksscrapeurl="https://users.alliedmods.net/~kyles/builds/SteamWorks" +steamworkslatestfile="$(curl -sL ${steamworksscrapeurl} | grep -m 1 linux | cut -d '"' -f 4)" +steamworksdownloadurl="${steamworksscrapeurl}/${steamworkslatestfile}" +steamworksurl="${steamworksdownloadurl}" +# CS:GO Mods +get5scrapepath="$(curl -sL https://ci.splewis.net/job/get5/lastSuccessfulBuild/api/xml | grep -oP "\K(.+)(?=)")" +get5latestfile="$(echo "${get5scrapepath}" | xargs -n 1 -I @ sh -c "echo "basename "@""")" +get5downloadurl="https://ci.splewis.net/job/get5/lastSuccessfulBuild/artifact/${get5scrapepath}" +get5url="${get5downloadurl}" # Oxide oxiderustlatestlink="$(curl -sL https://api.github.com/repos/theumod/umod.rust/releases/latest | grep browser_download_url | cut -d '"' -f 4)" oxidehurtworldlatestlink="$(curl -sL https://api.github.com/repos/OxideMod/Oxide.Hurtworld/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep "Oxide.Hurtworld.zip")" @@ -59,10 +69,12 @@ modseparator="MOD" # Source mods mod_info_metamod=( MOD "metamod" "MetaMod" "${metamodurl}" "${metamodlatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/metamod/metaplugins.ini;" "source;" "GAMES" "NOTGAMES" "https://www.sourcemm.net" "Plugins Framework" ) mod_info_sourcemod=( MOD "sourcemod" "SourceMod" "${sourcemodurl}" "${sourcemodlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "source;" "GAMES" "NOTGAMES" "http://www.sourcemod.net" "Admin Features (requires MetaMod)" ) +mod_info_steamworks=( MOD "steamworks" "SteamWorks" "${steamworksurl}" "${steamworkslatestfile}" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/KyleSanderson/SteamWorks" "Exposing SteamWorks functions to SourcePawn" ) # CS:GO Mods -mod_info_gokz=( MOD "gokz" "GOKZ" "https://bitbucket.org/kztimerglobalteam/gokz/downloads/GOKZ-latest.zip" "gokz-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter Strike: Global Offensive" "NOTGAMES" "https://bitbucket.org/kztimerglobalteam/gokz/src/master/" "Implements the KZ game mode (requires SourceMod and MetaMod)") -mod_info_ttt=( MOD "ttt" "Trouble in Terrorist Town" "https://csgottt.com/downloads/ttt-latest-dev-${sourcemodmversion}.zip" "ttt-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter Strike: Global Offensive" "NOTGAMES" "https://github.com/Bara/TroubleinTerroristTown" "Implements the TTT game mode (requires SourceMod and MetaMod)") +mod_info_gokz=( MOD "gokz" "GOKZ" "https://bitbucket.org/kztimerglobalteam/gokz/downloads/GOKZ-latest.zip" "gokz-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://bitbucket.org/kztimerglobalteam/gokz/src/master/" "Implements the KZ game mode (requires SourceMod and MetaMod)" ) +mod_info_ttt=( MOD "ttt" "Trouble in Terrorist Town" "https://csgottt.com/downloads/ttt-latest-dev-${sourcemodmversion}.zip" "ttt-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/Bara/TroubleinTerroristTown" "Implements the TTT game mode (requires SourceMod and MetaMod)" ) +mod_info_get5=( MOD "get5" "Get 5" "${get5url}" "${get5latestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/get5" "Plugin for competitive matches/scrims (requires SourceMod and MetaMod)" ) # Garry's Mod Addons mod_info_ulib=( MOD "ulib" "ULib" "https://codeload.github.com/TeamUlysses/ulib/zip/master" "ulib-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Complete Framework" ) @@ -85,4 +97,4 @@ mod_info_hwoxide=( MOD "hwoxide" "Oxide for Hurtworld" "${oxidehurtworldlatestli mod_info_sdtdoxide=( MOD "sdtdoxide" "Oxide for 7 Days To Die" "${oxidesdtdlatestlink}" "Oxide.SevenDaysToDie.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "7 Days To Die;" "NOTGAMES" "http://oxidemod.org/downloads/oxide-for-7-days-to-die.813/" "Allows for the use of plugins" ) # REQUIRED: Set all mods info into the global array -mods_global_array=( "${mod_info_metamod[@]}" "${mod_info_sourcemod[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" ) +mods_global_array=( "${mod_info_metamod[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" ) diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 2c6192030..56d55206f 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 madness quakelive realvirtuality refractor source goldsource 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 diff --git a/lgsm/functions/query_gsquery.py b/lgsm/functions/query_gsquery.py index fe809be15..b02262382 100644 --- a/lgsm/functions/query_gsquery.py +++ b/lgsm/functions/query_gsquery.py @@ -17,7 +17,7 @@ class gsquery: self.server_response_timeout = 5 self.default_buffer_length = 1024 # - sourcequery=[ 'avalanche3.0','madness','quakelive','realvirtuality','refractor','source','goldsource','spark','starbound','unity3d', 'unreal4', 'wurm' ] + sourcequery=[ 'avalanche3.0','barotrauma''madness','quakelive','realvirtuality','refractor','source','goldsource','spark','starbound','unity3d', 'unreal4', 'wurm' ] idtech3query=['idtech3','iw3.0','ioquake3'] idtech2query=['idtech2','quake','iw2.0'] minecraftquery=['minecraft','lwjgl2'] diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 6ed557140..f729bb8e0 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -20,8 +20,6 @@ fn_update_steamcmd_dl(){ cd "${steamcmddir}" || exit if [ "${appid}" == "90" ]; then ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} +quit | tee -a "${lgsmlog}" - elif [ "${shortname}" == "unt" ]; then - ${unbuffer} ./steamcmd.sh +@sSteamCmdForcePlatformBitness 32 +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} validate +quit elif [ "${gamename}" == "Jedi Knight II: Jedi Outcast" ]; ${unbuffer} ./steamcmd.sh +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} +quit | tee -a "${scriptlog}" else diff --git a/linuxgsm.sh b/linuxgsm.sh index c549ef46a..450218cb7 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,12 +20,12 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v19.6.0" +version="v19.8.4" shortname="core" gameservername="core" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -servicename="${gameservername}" +servicename="${selfname}" lockselfname=".${servicename}.lock" lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" @@ -58,8 +58,6 @@ core_functions.sh(){ # Bootstrap # Fetches the core functions required before passed off to core_dl.sh. - -# Fetches core functions. fn_bootstrap_fetch_file(){ remote_fileurl="${1}" local_filedir="${2}" @@ -274,15 +272,15 @@ if [ "$(whoami)" == "root" ]; then fi fi -# Download the latest serverlist. This is the complete list of all supported servers. -fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" -if [ ! -f "${serverlist}" ]; then - echo "[ FAIL ] serverlist.csv could not be loaded." - exit 1 -fi - # LinuxGSM installer mode. if [ "${shortname}" == "core" ]; then + # Download the latest serverlist. This is the complete list of all supported servers. + fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" + if [ ! -f "${serverlist}" ]; then + echo "[ FAIL ] serverlist.csv could not be loaded." + exit 1 + fi + if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then { tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index ca4bf150f..de29a27d1 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -26,7 +26,7 @@ shortname="fctr" gameservername="fctrserver" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -servicename="${gameservername}" +servicename="${selfname}" lockselfname=".${servicename}.lock" lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index dbcca9b42..065c67f18 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -26,7 +26,7 @@ shortname="jc2" gameservername="jc2server" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -servicename="${gameservername}" +servicename="${selfname}" lockselfname=".${servicename}.lock" lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 426851163..4be29da73 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -26,7 +26,7 @@ shortname="mc" gameservername="mcserver" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -servicename="${gameservername}" +servicename="${selfname}" lockselfname=".${servicename}.lock" lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index d243ef13e..faeb0e616 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -26,7 +26,7 @@ shortname="ts3" gameservername="ts3server" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -servicename="${gameservername}" +servicename="${selfname}" lockselfname=".${servicename}.lock" lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log"