Browse Source

Merge branch 'develop' into feature/1202-jediknight2

pull/3002/head
Daniel Gibbs 6 years ago
parent
commit
9c889d7d74
  1. 12
      .github/FUNDING.yml
  2. 4
      .github/issue_label_bot.yaml
  3. 133
      lgsm/config-default/config-lgsm/btserver/_default.cfg
  4. 4
      lgsm/config-default/config-lgsm/untserver/_default.cfg
  5. 1
      lgsm/data/serverlist.csv
  6. 2
      lgsm/functions/check_permissions.sh
  7. 3
      lgsm/functions/check_system_requirements.sh
  8. 2
      lgsm/functions/command_install.sh
  9. 4
      lgsm/functions/command_monitor.sh
  10. 2
      lgsm/functions/command_start.sh
  11. 2
      lgsm/functions/command_validate.sh
  12. 10
      lgsm/functions/fix_steamcmd.sh
  13. 4
      lgsm/functions/fix_unt.sh
  14. 26
      lgsm/functions/info_config.sh
  15. 13
      lgsm/functions/info_messages.sh
  16. 8
      lgsm/functions/info_parms.sh
  17. 7
      lgsm/functions/install_config.sh
  18. 4
      lgsm/functions/install_ut2k4_key.sh
  19. 40
      lgsm/functions/mods_core.sh
  20. 18
      lgsm/functions/mods_list.sh
  21. 2
      lgsm/functions/query_gamedig.sh
  22. 2
      lgsm/functions/query_gsquery.py
  23. 2
      lgsm/functions/update_steamcmd.sh
  24. 20
      linuxgsm.sh
  25. 2
      tests/tests_fctrserver.sh
  26. 2
      tests/tests_jc2server.sh
  27. 2
      tests/tests_mcserver.sh
  28. 2
      tests/tests_ts3server.sh

12
.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

4
.github/issue_label_bot.yaml

@ -0,0 +1,4 @@
label-alias:
bug: 'type: bug'
feature_request: 'type: feature request'
question: 'question'

133
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 protected]"
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="[email protected]"
mailgunemail="[email protected]"
# 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"

4
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"

1
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

1 arma3 arma3server ARMA 3
8 bs bsserver Blade Symphony
9 bb bbserver BrainBread
10 bb2 bb2server BrainBread 2
11 bt btserver Barotrauma
12 bt1944 bt1944server Battalion 1944
13 cod codserver Call of Duty
14 cod2 cod2server Call of Duty 2

2
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"

3
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"

2
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

4
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

2
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

2
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

10
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"

4
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"

26
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

13
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

8
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

7
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

4
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 ""
echo ""

40
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.

18
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 "<relativePath>\K(.+)(?=</relativePath>)")"
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[@]}" )

2
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

2
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']

2
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

20
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}'

2
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"

2
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"

2
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"

2
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"

Loading…
Cancel
Save