Browse Source

Merge branch 'develop' into master

pull/2110/head
Daniel Gibbs 6 years ago
committed by GitHub
parent
commit
0adfe33c1f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      .github/ISSUE_TEMPLATE/bug_report.md
  2. 6
      .github/ISSUE_TEMPLATE/feature_request.md
  3. 6
      .github/ISSUE_TEMPLATE/new-server-request.md
  4. 73
      CODE_OF_CONDUCT.md
  5. 17
      lgsm/config-default/config-lgsm/csgoserver/_default.cfg
  6. 1
      lgsm/config-default/config-lgsm/pstbsserver/_default.cfg
  7. 127
      lgsm/config-default/config-lgsm/sbotsserver/_default.cfg
  8. 2
      lgsm/config-default/config-lgsm/squadserver/_default.cfg
  9. 1
      lgsm/data/serverlist.csv
  10. 4
      lgsm/functions/check_config.sh
  11. 2
      lgsm/functions/check_deps.sh
  12. 2
      lgsm/functions/check_ip.sh
  13. 2
      lgsm/functions/check_logs.sh
  14. 4
      lgsm/functions/command_console.sh
  15. 2
      lgsm/functions/command_details.sh
  16. 4
      lgsm/functions/command_dev_clear_functions.sh
  17. 2
      lgsm/functions/command_dev_query_raw.sh
  18. 10
      lgsm/functions/command_fastdl.sh
  19. 12
      lgsm/functions/command_install.sh
  20. 8
      lgsm/functions/command_monitor.sh
  21. 2
      lgsm/functions/command_postdetails.sh
  22. 2
      lgsm/functions/command_start.sh
  23. 20
      lgsm/functions/command_stop.sh
  24. 12
      lgsm/functions/command_update.sh
  25. 8
      lgsm/functions/command_validate.sh
  26. 4
      lgsm/functions/command_wipe.sh
  27. 20
      lgsm/functions/core_getopt.sh
  28. 28
      lgsm/functions/fix.sh
  29. 6
      lgsm/functions/fix_steamcmd.sh
  30. 88
      lgsm/functions/info_config.sh
  31. 3
      lgsm/functions/info_glibc.sh
  32. 21
      lgsm/functions/info_messages.sh
  33. 34
      lgsm/functions/info_parms.sh
  34. 2
      lgsm/functions/mods_core.sh
  35. 12
      lgsm/functions/query_gamedig.sh
  36. 4
      lgsm/functions/update_ts3.sh

16
.github/ISSUE_TEMPLATE/bug_report.md

@ -1,6 +1,7 @@
--- ---
name: Bug report name: Bug report
about: Create a report to help us improve about: Found a bug? Raise a report
--- ---
@ -8,18 +9,27 @@ Follow **[this guide](https://linuxgsm.com/support/#guide)** to make sure you po
For general support visit the **[steam group](https://linuxgsm.com/steam)**. For general support visit the **[steam group](https://linuxgsm.com/steam)**.
GitHub is **ONLY** for: GitHub is **ONLY** for:
```
* LinuxGSM bugs * LinuxGSM bugs
* feature suggestions * feature suggestions
* code contributions * code contributions
```
GitHub is **NOT** for: GitHub is **NOT** for:
```
* General support * General support
* Specific game server issues (e.g CS:GO, TF2) * Specific game server issues (e.g CS:GO, TF2)
* Dedicated server issues (e.g Ubuntu, CentOS) * Dedicated server issues (e.g Ubuntu, CentOS)
* Anything not directly related to LinuxGSM development * Anything not directly related to LinuxGSM development
```
Any general support issues on GitHub will be closed. Any general support issues on GitHub will be closed.
*Please use the template below*
**Basic info**
Game:
Distro:
**Describe the bug** **Describe the bug**
A clear and concise description of what the bug is. A clear and concise description of what the bug is.
@ -33,7 +43,7 @@ Steps to reproduce the behaviour:
**Expected behaviour** **Expected behaviour**
A clear and concise description of what you expected to happen. A clear and concise description of what you expected to happen.
** Minimum Information ** **Minimum Information**
The game server you are running (e.g. Rust/CS:GO). The game server you are running (e.g. Rust/CS:GO).
The link from `./gameserver postdetails` command. The link from `./gameserver postdetails` command.

6
.github/ISSUE_TEMPLATE/feature_request.md

@ -20,6 +20,12 @@ GitHub is **NOT** for:
Any general support issues on GitHub will be closed. Any general support issues on GitHub will be closed.
*Please use the template below*
**Basic info**
Game:
Distro:
**Is your feature request related to a problem? Please describe.** **Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

6
.github/ISSUE_TEMPLATE/new-server-request.md

@ -4,13 +4,13 @@ about: Suggest a new game server to be added
--- ---
**What game server Would you like adding?** **What game server would you like adding?**
**Can you link to any tutorials or guides?** **Can you link to any tutorials or guides?**
Any useful guides will help with development Any useful guides will help with development
**Is the server on Steam?** **Is the server on Steam?**
If yes Use SteamDB to get the appid. https://steamdb.info/ If yes Use SteamDB to get the appid. (https://steamdb.info)
**Is the server supported on Linux?** **Is the server supported on Linux?**
We only support Linux servers and dont support Wine. We only support Linux servers and do not support Wine.

73
CODE_OF_CONDUCT.md

@ -0,0 +1,73 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

17
lgsm/config-default/config-lgsm/csgoserver/_default.cfg

@ -10,14 +10,15 @@
## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters
# https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Dedicated_Servers#Starting_the_Server # https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Dedicated_Servers#Starting_the_Server
# [Game Modes] gametype gamemode mapgroup (you can mix these across Game Modes, but use only one) # [Game Modes] gametype gamemode mapgroup (you can mix these across Game Modes, but use only one)
# Arms Race 1 0 mg_armsrace # Arms Race 1 0 mg_armsrace
# Classic Casual 0 0 mg_casualsigma, mg_casualdelta # Classic Casual 0 0 mg_casualsigma, mg_casualdelta
# Classic Competitive 0 1 mg_active, mg_reserves, mg_hostage, mg_de_dust2 # Classic Competitive 0 1 mg_active, mg_reserves, mg_hostage, mg_de_dust2
# Custom 3 0 # Custom 3 0
# Deathmatch 1 2 mg_deathmatch # Deathmatch 1 2 mg_deathmatch
# Demolition 1 1 mg_demolition # Demolition 1 1 mg_demolition
# Wingman 0 2 # Wingman 0 2
# Danger Zone (FreeForAll) 6 0 mg_dz_blacksite
gametype="0" gametype="0"
gamemode="0" gamemode="0"
mapgroup="mg_active" mapgroup="mg_active"

1
lgsm/config-default/config-lgsm/pstbsserver/_default.cfg

@ -9,7 +9,6 @@
#### Server Settings #### #### Server Settings ####
## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters
ip="0.0.0.0" ip="0.0.0.0"
randommap="ALWAYS" randommap="ALWAYS"
port="10027" port="10027"

127
lgsm/config-default/config-lgsm/sbotsserver/_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://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters
port="7777"
queryport="27015"
defaultmap="StationKappa"
servername="LinuxGSM Server"
serverpassword="NOT SET" # Can't be adjusted currently
maxplayers="8" # Can't be adjusted currently
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
fn_parms(){
parms="Port=${port}?QueryPort=${queryport} -startup_map ${defaultmap} -server_name \"${servername}\""
}
#### LinuxGSM Settings ####
## Notification Alerts
# (on|off)
# More info | https://github.com/GameServerManagers/LinuxGSM/wiki/Alerts#more-info
postalert="off"
postdays="7"
posttarget="https://hastebin.com"
# Discord Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Discord
discordalert="off"
discordwebhook="webhook"
# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email
emailalert="off"
email="[email protected]"
emailfrom=""
# IFTTT Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/IFTTT
iftttalert="off"
ifttttoken="accesstoken"
iftttevent="linuxgsm_alert"
# Mailgun Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/mailgun
mailgunalert="off"
mailguntoken="accesstoken"
mailgundomain="example.com"
mailgunemailfrom="[email protected]"
mailgunemail="[email protected]"
# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet
pushbulletalert="off"
pushbullettoken="accesstoken"
channeltag=""
# Pushover Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushover
pushoveralert="off"
pushovertoken="accesstoken"
# Telegram Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/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://github.com/GameServerManagers/LinuxGSM/wiki/Backup
maxbackups="4"
maxbackupdays="30"
stoponbackup="on"
## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging
consolelogging="on"
logdays="7"
#### LinuxGSM Advanced Settings ####
# ANSI Colors
ansi="on"
## SteamCMD Settings
# Server appid
appid="974130"
# Steam App Branch Select
# Allows to opt into the various Steam app branches. Default branch is "".
# Example: "-beta latest_experimental"
branch=""
## LinuxGSM Server Details
# Do not edit
gamename="StickyBots"
engine="unreal4"
#### Directories ####
# Edit with care
## Server Specific Directories
systemdir="${serverfiles}"
executabledir="${systemdir}/blank1/Binaries/Linux"
executable="./blank1Server-Linux-Shipping"
servercfg="Game.ini"
servercfgdefault="Game.ini"
servercfgdir="${systemdir}/blank1/Saved/Config/LinuxServer"
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"

2
lgsm/config-default/config-lgsm/squadserver/_default.cfg

@ -9,10 +9,10 @@
#### Server Settings #### #### Server Settings ####
## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters
ip="0.0.0.0"
port="7787" port="7787"
queryport="27165" queryport="27165"
randommap="ALWAYS" randommap="ALWAYS"
ip="0.0.0.0"
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
fn_parms(){ fn_parms(){

1
lgsm/data/serverlist.csv

@ -64,6 +64,7 @@ ricochet,ricochetserver,Ricochet
rust,rustserver,Rust rust,rustserver,Rust
rw,rwserver, Rising World rw,rwserver, Rising World
samp,sampserver,San Andreas Multiplayer samp,sampserver,San Andreas Multiplayer
sbot,sbotserver, StickyBots
ss3,ss3server,Serious Sam 3: BFE ss3,ss3server,Serious Sam 3: BFE
sb,sbserver,Starbound sb,sbserver,Starbound
st,stserver,Stationeers st,stserver,Stationeers

1 arma3 arma3server ARMA 3
64 rust rustserver Rust
65 rw rwserver Ris

4
lgsm/functions/check_config.sh

@ -8,7 +8,7 @@ local commandname="CHECK"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ ! -e "${servercfgfullpath}" ]; then if [ ! -e "${servercfgfullpath}" ]; then
if [ "${gamename}" != "Hurtworld" ]&&[ "${shortname}" != "ut3" ]&&[ "${shortname}" != "kf2" ]; then if [ "${shortname}" != "hw" ]&&[ "${shortname}" != "ut3" ]&&[ "${shortname}" != "kf2" ]; then
fn_print_dots "" fn_print_dots ""
sleep 0.5 sleep 0.5
fn_print_warn_nl "Configuration file missing!" fn_print_warn_nl "Configuration file missing!"
@ -20,7 +20,7 @@ if [ ! -e "${servercfgfullpath}" ]; then
fi fi
fi fi
if [ "${gamename}" == "Rust" ]; then if [ "${shortname}" == "rust" ]; then
if [ -z "${rconpassword}" ]; then if [ -z "${rconpassword}" ]; then
fn_print_dots "" fn_print_dots ""
sleep 0.5 sleep 0.5

2
lgsm/functions/check_deps.sh

@ -474,7 +474,7 @@ fn_deps_build_redhat(){
# Brainbread 2, Don't Starve Together & Team Fortress 2 # Brainbread 2, Don't Starve Together & Team Fortress 2
elif [ "${shortname}" == "bb2" ]||[ "${shortname}" == "dst" ]||[ "${shortname}" == "tf2" ]; then elif [ "${shortname}" == "bb2" ]||[ "${shortname}" == "dst" ]||[ "${shortname}" == "tf2" ]; then
array_deps_required+=( libcurl.i686 ) array_deps_required+=( libcurl.i686 )
if [ "${gamename}" == "Team Fortress 2" ]; then if [ "${shortname}" == "tf2" ]; then
array_deps_required+=( gperftools-libs.i686 ) array_deps_required+=( gperftools-libs.i686 )
fi fi
# Battlefield: 1942 # Battlefield: 1942

2
lgsm/functions/check_ip.sh

@ -7,7 +7,7 @@
local commandname="CHECK" local commandname="CHECK"
if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${gamename}" != "Mumble" ]&&[ "${travistest}" != "1" ]; then if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "mumble" ]&&[ "${travistest}" != "1" ]; then
if [ ! -f "/bin/ip" ]; then if [ ! -f "/bin/ip" ]; then
ipcommand="/sbin/ip" ipcommand="/sbin/ip"
else else

2
lgsm/functions/check_logs.sh

@ -16,7 +16,7 @@ fn_check_logs(){
} }
# Create directories for the script and console logs # Create directories for the script and console logs
if [ ! -d "${lgsmlogdir}" ]||[ ! -d "${consolelogdir}" ]&&[ "${gamename}" != "TeamSpeak 3" ]; then if [ ! -d "${lgsmlogdir}" ]||[ ! -d "${consolelogdir}" ]&&[ "${shortname}" != "ts3" ]; then
fn_check_logs fn_check_logs
fi fi

4
lgsm/functions/command_console.sh

@ -10,10 +10,8 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
check.sh check.sh
fn_print_header fn_print_header
if [ "${gamename}" == "Rust" ]||[ "${gamename}" == "Hurtworld" ]||[ "${gamename}" == "ARK: Survival Evolved" ]; then if [ "${shortname}" == "rust" ]||[ "${shortname}" == "hw" ]||[ "${shortname}" == "ark" ]; then
fn_print_information_nl "${gamename} does not produce a verbose output to the console" fn_print_information_nl "${gamename} does not produce a verbose output to the console"
fi
if [ "${gamename}" == "Rust" ]||[ "${gamename}" == "Hurtworld" ]||[ "${gamename}" == "ARK: Survival Evolved" ]; then
fn_print_information_nl "${gamename} does not allow server commands to be entered in to the console" fn_print_information_nl "${gamename} does not allow server commands to be entered in to the console"
fi fi
fn_print_information_nl "Press \"CTRL+b\" then \"d\" to exit console." fn_print_information_nl "Press \"CTRL+b\" then \"d\" to exit console."

2
lgsm/functions/command_details.sh

@ -24,7 +24,7 @@ fn_info_message_gameserver
fn_info_message_script fn_info_message_script
fn_info_message_backup fn_info_message_backup
# Some game servers do not have parms. # Some game servers do not have parms.
if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${engine}" != "avalanche2.0" ]&&[ "${engine}" != "dontstarve" ]&&[ "${engine}" != "projectzomboid" ]&&[ "${engine}" != "renderware" ]; then if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "jc2" ]&&[ "${shortname}" != "dst" ]&&[ "${shortname}" != "pz" ]&&[ "${engine}" != "renderware" ]; then
fn_parms fn_parms
fn_info_message_commandlineparms fn_info_message_commandlineparms
fi fi

4
lgsm/functions/command_dev_clear_functions.sh

@ -9,7 +9,7 @@ echo "Clear Functions"
echo "=================================" echo "================================="
echo "" echo ""
if fn_prompt_yn "Do you want to delete all functions?" Y; then if fn_prompt_yn "Do you want to delete all functions?" Y; then
rm -rfv "${functionsdir}"/* rm -rfv "${functionsdir:?}/"*
rm -rfv "${configdirdefault}"/* rm -rfv "${configdirdefault:?}/"*
fi fi
core_exit.sh core_exit.sh

2
lgsm/functions/command_dev_query_raw.sh

@ -24,7 +24,7 @@ info_config.sh
info_parms.sh info_parms.sh
if [ "${engine}" == "idtech3_ql" ]; then if [ "${engine}" == "idtech3_ql" ]; then
local engine="quakelive" local engine="quakelive"
elif [ "${gamename}" == "Killing Floor 2" ]; then elif [ "${shortname}" == "kf2" ]; then
local engine="unreal4" local engine="unreal4"
fi fi

10
lgsm/functions/command_fastdl.sh

@ -51,7 +51,7 @@ if [ -d "${fastdldir}" ]; then
fi fi
# Garry's Mod Specific # Garry's Mod Specific
if [ "${gamename}" == "Garry's Mod" ]; then if [ "${shortname}" == "gmod" ]; then
# Prompt for download enforcer, which is using a .lua addfile resource generator # Prompt for download enforcer, which is using a .lua addfile resource generator
if fn_prompt_yn "Force clients to download files?" Y; then if fn_prompt_yn "Force clients to download files?" Y; then
luaresource="on" luaresource="on"
@ -152,7 +152,7 @@ fn_fastdl_preview(){
echo -e "analysing required files" echo -e "analysing required files"
fn_script_log_info "Analysing required files" fn_script_log_info "Analysing required files"
# Garry's Mod # Garry's Mod
if [ "${gamename}" == "Garry's Mod" ]; then if [ "${shortname}" == "gmod" ]; then
cd "${systemdir}" || exit cd "${systemdir}" || exit
allowed_extentions_array=( "*.ain" "*.bsp" "*.mdl" "*.mp3" "*.ogg" "*.otf" "*.pcf" "*.phy" "*.png" "*.vtf" "*.vmt" "*.vtx" "*.vvd" "*.ttf" "*.wav" ) allowed_extentions_array=( "*.ain" "*.bsp" "*.mdl" "*.mp3" "*.ogg" "*.otf" "*.pcf" "*.phy" "*.png" "*.vtf" "*.vmt" "*.vtx" "*.vvd" "*.ttf" "*.wav" )
for allowed_extention in "${allowed_extentions_array[@]}"; do for allowed_extention in "${allowed_extentions_array[@]}"; do
@ -207,7 +207,7 @@ fn_fastdl_preview(){
sleep 0.5 sleep 0.5
totalfiles=$(wc -l < "${tmpdir}/fastdl_files_to_compress.txt") totalfiles=$(wc -l < "${tmpdir}/fastdl_files_to_compress.txt")
# Calculates total file size # Calculates total file size
while read dufile; do while read -r dufile; do
filesize=$(stat -c %s "${dufile}") filesize=$(stat -c %s "${dufile}")
filesizetotal=$(( ${filesizetotal} + ${filesize} )) filesizetotal=$(( ${filesizetotal} + ${filesize} ))
exitcode=$? exitcode=$?
@ -358,7 +358,7 @@ fn_fastdl_build(){
# Copy all needed files for FastDL # Copy all needed files for FastDL
echo -e "copying files to ${fastdldir}" echo -e "copying files to ${fastdldir}"
fn_script_log_info "Copying files to ${fastdldir}" fn_script_log_info "Copying files to ${fastdldir}"
if [ "${gamename}" == "Garry's Mod" ]; then if [ "${shortname}" == "gmod" ]; then
fn_fastdl_gmod fn_fastdl_gmod
fn_fastdl_gmod_dl_enforcer fn_fastdl_gmod_dl_enforcer
else else
@ -387,7 +387,7 @@ fn_fastdl_gmod_dl_enforcer(){
echo -en "creating new download enforcer: ${luafastdlfile}..." echo -en "creating new download enforcer: ${luafastdlfile}..."
touch "${luafastdlfullpath}" touch "${luafastdlfullpath}"
# Read all filenames and put them into a lua file at the right path # Read all filenames and put them into a lua file at the right path
while read line; do while read -r line; do
echo "resource.AddFile( \"${line}\" )" >> "${luafastdlfullpath}" echo "resource.AddFile( \"${line}\" )" >> "${luafastdlfullpath}"
done < <(find "${fastdldir:?}" \( -type f ! -name "*.bz2" \) -printf '%P\n') done < <(find "${fastdldir:?}" \( -type f ! -name "*.bz2" \) -printf '%P\n')
exitcode=$? exitcode=$?

12
lgsm/functions/command_install.sh

@ -19,7 +19,7 @@ else
check_deps.sh check_deps.sh
installflag=1 installflag=1
# Download and install # Download and install
if [ "${gamename}" == "Unreal Tournament 2004" ]; then if [ "${shortname}" == "ut2k4" ]; then
install_server_files.sh install_server_files.sh
install_ut2k4_key.sh install_ut2k4_key.sh
elif [ -z "${appid}" ]; then elif [ -z "${appid}" ]; then
@ -32,15 +32,15 @@ else
# Configuration # Configuration
install_config.sh install_config.sh
if [ "${gamename}" == "BrainBread 2" ]||[ "${gamename}" == "Black Mesa: Deathmatch" ]||[ "${gamename}" == "Counter-Strike: Global Offensive" ]||[ "${gamename}" == "Empires Mod" ]||[ "${gamename}" == "Garry’s Mod" ]||[ "${gamename}" == "No more Room in Hell" ]||[ "${gamename}" == "Team Fortress 2" ]||[ "${gamename}" == "Tower Unite" ]; then if [ "${shortname}" == "bb2" ]||[ "${shortname}" == "bmdm" ]||[ "${shortname}" == "csgo" ]||[ "${shortname}" == "em" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "tf2" ]||[ "${shortname}" == "tu" ]; then
install_gslt.sh install_gslt.sh
elif [ "${gamename}" == "Don't Starve Together" ]; then elif [ "${shortname}" == "dst" ]; then
install_dst_token.sh install_dst_token.sh
elif [ "${gamename}" == "Squad" ]; then elif [ "${shortname}" == "squad" ]; then
install_squad_license.sh install_squad_license.sh
elif [ "${gamename}" == "TeamSpeak 3" ]; then elif [ "${shortname}" == "ts3" ]; then
install_ts3db.sh install_ts3db.sh
elif [ "${gamename}" == "Multi Theft Auto" ]; then elif [ "${shortname}" == "mta" ]; then
command_install_resources_mta.sh command_install_resources_mta.sh
fi fi

8
lgsm/functions/command_monitor.sh

@ -110,9 +110,9 @@ fn_monitor_check_session(){
fn_print_ok_eol_nl fn_print_ok_eol_nl
fn_script_log_pass "Checking session: OK" fn_script_log_pass "Checking session: OK"
else else
if [ "${gamename}" == "TeamSpeak 3" ]; then if [ "${shortname}" == "ts3" ]; then
fn_print_error "Checking session: ${ts3error}: " fn_print_error "Checking session: ${ts3error}: "
elif [ "${gamename}" == "Mumble" ]; then elif [ "${shortname}" == "mumble" ]; then
fn_print_error "Checking session: Not listening to port ${queryport}" fn_print_error "Checking session: Not listening to port ${queryport}"
else else
fn_print_error "Checking session: " fn_print_error "Checking session: "
@ -137,7 +137,7 @@ fn_monitor_query(){
if [ "${allowed_engine}" == "${engine}" ]; then if [ "${allowed_engine}" == "${engine}" ]; then
if [ "${engine}" == "idtech3_ql" ]; then if [ "${engine}" == "idtech3_ql" ]; then
local engine="quakelive" local engine="quakelive"
elif [ "${gamename}" == "Killing Floor 2" ]; then elif [ "${shortname}" == "kf2" ]; then
local engine="unreal4" local engine="unreal4"
fi fi
@ -186,7 +186,7 @@ fn_monitor_check_lockfile
fn_monitor_check_update fn_monitor_check_update
fn_monitor_check_session fn_monitor_check_session
# Query has to be enabled in Starbound config # Query has to be enabled in Starbound config
if [ "${gamename}" == "Starbound" ]; then if [ "${shortname}" == "sb" ]; then
if [ "${queryenabled}" == "true" ]; then if [ "${queryenabled}" == "true" ]; then
fn_monitor_query fn_monitor_query
fi fi

2
lgsm/functions/command_postdetails.sh

@ -68,7 +68,7 @@ else
fn_info_message_script fn_info_message_script
fn_info_message_backup fn_info_message_backup
# Some game servers do not have parms. # Some game servers do not have parms.
if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${engine}" != "avalanche2.0" ]&&[ "${engine}" != "avalanche3.0" ]&&[ "${engine}" != "dontstarve" ]&&[ "${engine}" != "projectzomboid" ]&&[ "${engine}" != "renderware" ]; then if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "jc2" ]&&[ "${shortname}" != "jc3" ]&&[ "${shortname}" != "dst" ]&&[ "${shortname}" != "pz" ]&&[ "${engine}" != "renderware" ]; then
fn_parms fn_parms
fn_info_message_commandlineparms fn_info_message_commandlineparms
fi fi

2
lgsm/functions/command_start.sh

@ -214,7 +214,7 @@ if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]||[ "${updateon
command_update.sh command_update.sh
fi fi
if [ "${gamename}" == "TeamSpeak 3" ]; then if [ "${shortname}" == "ts3" ]; then
fn_start_teamspeak3 fn_start_teamspeak3
else else
fn_start_tmux fn_start_tmux

20
lgsm/functions/command_stop.sh

@ -174,22 +174,22 @@ fn_stop_graceful_sdtd(){
} }
fn_stop_graceful_select(){ fn_stop_graceful_select(){
if [ "${gamename}" == "7 Days To Die" ]; then if [ "${shortname}" == "sdtd" ]; then
fn_stop_graceful_sdtd fn_stop_graceful_sdtd
elif [ "${engine}" == "Spark" ]; then elif [ "${engine}" == "Spark" ]; then
fn_stop_graceful_cmd "q" 30 fn_stop_graceful_cmd "q" 30
elif [ "${gamename}" == "Terraria" ]; then elif [ "${shortname}" == "terraria" ]; then
fn_stop_graceful_cmd "exit" 30 fn_stop_graceful_cmd "exit" 30
elif [ "${gamename}" == "Minecraft" ]; then elif [ "${shortname}" == "mc" ]; then
fn_stop_graceful_cmd "stop" 30 fn_stop_graceful_cmd "stop" 30
elif [ "${gamename}" == "Multi Theft Auto" ]; then elif [ "${shortname}" == "mta" ]; then
# we need a long wait time here as resources are stopped individually and process their own shutdowns # we need a long wait time here as resources are stopped individually and process their own shutdowns
fn_stop_graceful_cmd "quit" 120 fn_stop_graceful_cmd "quit" 120
elif [ "${engine}" == "goldsource" ]; then elif [ "${engine}" == "goldsource" ]; then
fn_stop_graceful_goldsource fn_stop_graceful_goldsource
elif [ "${engine}" == "avalanche2.0" ]||[ "${engine}" == "avalanche3.0" ]||[ "${gamename}" == "Factorio" ]||[ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal4" ]||[ "${engine}" == "unreal3" ]||[ "${engine}" == "unreal2" ]||[ "${engine}" == "unreal" ]||[ "${gamename}" == "Mumble" ]||[ "${shortname}" == "wurm" ]; then elif [ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal4" ]||[ "${engine}" == "unreal3" ]||[ "${engine}" == "unreal2" ]||[ "${engine}" == "unreal" ]||[ "${shortname}" == "fctr" ]||[ "${shortname}" == "mumble" ]||[ "${shortname}" == "wurm" ]||[ "${shortname}" == "jc2" ]||[ "${shortname}" == "jc3" ]; then
fn_stop_graceful_ctrlc fn_stop_graceful_ctrlc
elif [ "${engine}" == "source" ]||[ "${engine}" == "quake" ]||[ "${engine}" == "idtech2" ]||[ "${engine}" == "idtech3" ]||[ "${engine}" == "idtech3_ql" ]||[ "${engine}" == "Just Cause 2" ]||[ "${engine}" == "projectzomboid" ]||[ "${shortname}" == "rw" ]; then elif [ "${engine}" == "source" ]||[ "${engine}" == "quake" ]||[ "${engine}" == "idtech2" ]||[ "${engine}" == "idtech3" ]||[ "${engine}" == "idtech3_ql" ]||[ "${shortname}" == "jc2" ]||[ "${shortname}" == "pz" ]||[ "${shortname}" == "rw" ]; then
fn_stop_graceful_cmd "quit" 30 fn_stop_graceful_cmd "quit" 30
fi fi
} }
@ -212,9 +212,7 @@ fn_stop_ark(){
if [ "${#queryport}" -gt 0 ] ; then if [ "${#queryport}" -gt 0 ] ; then
for (( pidcheck=0 ; pidcheck < ${maxpiditer} ; pidcheck++ )) ; do for (( pidcheck=0 ; pidcheck < ${maxpiditer} ; pidcheck++ )) ; do
pid=$(netstat -nap 2>/dev/null | grep "^udp[[:space:]]" |\ pid=$(netstat -nap 2>/dev/null | grep "^udp[[:space:]]" | grep ":${queryport}[[:space:]]" | rev | awk '{print $1}' | rev | cut -d\/ -f1)
grep ":${queryport}[[:space:]]" | rev | awk '{print $1}' |\
rev | cut -d\/ -f1)
# #
# check for a valid pid # check for a valid pid
pid=${pid//[!0-9]/} pid=${pid//[!0-9]/}
@ -263,7 +261,7 @@ fn_stop_tmux(){
if [ "${status}" == "0" ]; then if [ "${status}" == "0" ]; then
# ARK doesn't clean up immediately after tmux is killed. # ARK doesn't clean up immediately after tmux is killed.
# Make certain the ports are cleared before continuing. # Make certain the ports are cleared before continuing.
if [ "${gamename}" == "ARK: Survival Evolved" ]; then if [ "${shortname}" == "ark" ]; then
fn_stop_ark fn_stop_ark
fi fi
fn_print_ok_nl "${servername}" fn_print_ok_nl "${servername}"
@ -280,7 +278,7 @@ fn_stop_pre_check(){
if [ "${status}" == "0" ]; then # $status comes from check_status.sh, which is run by check.sh for this command if [ "${status}" == "0" ]; then # $status comes from check_status.sh, which is run by check.sh for this command
fn_print_info_nl "${servername} is already stopped" fn_print_info_nl "${servername} is already stopped"
fn_script_log_error "${servername} is already stopped" fn_script_log_error "${servername} is already stopped"
elif [ "${gamename}" == "TeamSpeak 3" ]; then elif [ "${shortname}" == "ts3" ]; then
fn_stop_teamspeak3 fn_stop_teamspeak3
else else
fn_stop_graceful_select fn_stop_graceful_select

12
lgsm/functions/command_update.sh

@ -9,19 +9,19 @@ local commandaction="Update"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_print_dots "" fn_print_dots ""
sleep 0.5 sleep 0.2
check.sh check.sh
logs.sh logs.sh
if [ "${gamename}" == "TeamSpeak 3" ]; then if [ "${shortname}" == "ts3" ]; then
update_ts3.sh update_ts3.sh
elif [ "${engine}" == "lwjgl2" ]; then elif [ "${shortname}" == "mc" ]; then
update_minecraft.sh update_minecraft.sh
elif [ "${gamename}" == "Mumble" ]; then elif [ "${shortname}" == "mumble" ]; then
update_mumble.sh update_mumble.sh
elif [ "${gamename}" == "Factorio" ]; then elif [ "${shortname}" == "fctr" ]; then
update_factorio.sh update_factorio.sh
elif [ "${gamename}" == "Multi Theft Auto" ]; then elif [ "${shortname}" == "mta" ]; then
update_mta.sh update_mta.sh
else else
update_steamcmd.sh update_steamcmd.sh

8
lgsm/functions/command_validate.sh

@ -51,17 +51,9 @@ if [ "${status}" != "0" ]; then
exitbypass=1 exitbypass=1
command_stop.sh command_stop.sh
fn_validation "${appid}" fn_validation "${appid}"
# will also check for second appid
if [ "${gamename}" == "Classic Offensive" ]; then
fn_validation "${appid_co}"
fi
exitbypass=1 exitbypass=1
command_start.sh command_start.sh
else else
fn_validation fn_validation
# will also check for second appid
if [ "${gamename}" == "Classic Offensive" ]; then
fn_validation "${appid_co}"
fi
fi fi
core_exit.sh core_exit.sh

4
lgsm/functions/command_wipe.sh

@ -43,7 +43,7 @@ fn_wipe_exit_code(){
# Removes files to wipe server # Removes files to wipe server
fn_wipe_server_remove_files(){ fn_wipe_server_remove_files(){
# Rust Wipe # Rust Wipe
if [ "${gamename}" == "Rust" ]; then if [ "${shortname}" == "rust" ]; then
# Wipe pocedural map # Wipe pocedural map
if [ -n "$(find "${serveridentitydir}" -type f -name "proceduralmap.*.map")" ]; then if [ -n "$(find "${serveridentitydir}" -type f -name "proceduralmap.*.map")" ]; then
currentaction="Removing map file(s): ${serveridentitydir}/proceduralmap.*.map" currentaction="Removing map file(s): ${serveridentitydir}/proceduralmap.*.map"
@ -188,7 +188,7 @@ fn_wipe_server_remove_files(){
# Check if there is something to wipe, prompt the user, and call appropriate functions # Check if there is something to wipe, prompt the user, and call appropriate functions
# Rust Wipe # Rust Wipe
if [ "${gamename}" == "Rust" ]; then if [ "${shortname}" == "rust" ]; then
if [ -d "${serveridentitydir}/storage" ]||[ -d "${serveridentitydir}/user" ]||[ -n "$(find "${serveridentitydir}" -type f -name "proceduralmap*.sav")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "barren*.sav")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "Log.*.txt")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "player.deaths.*.db")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "sv.files.*.db")" ]; then if [ -d "${serveridentitydir}/storage" ]||[ -d "${serveridentitydir}/user" ]||[ -n "$(find "${serveridentitydir}" -type f -name "proceduralmap*.sav")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "barren*.sav")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "Log.*.txt")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "player.deaths.*.db")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "sv.files.*.db")" ]; then
fn_print_warning_nl "Any user, storage, log and map data from ${serveridentitydir} will be erased." fn_print_warning_nl "Any user, storage, log and map data from ${serveridentitydir} will be erased."
if ! fn_prompt_yn "Continue?" Y; then if ! fn_prompt_yn "Continue?" Y; then

20
lgsm/functions/core_getopt.sh

@ -61,10 +61,10 @@ currentopt=( "${cmd_start[@]}" "${cmd_stop[@]}" "${cmd_restart[@]}" "${cmd_monit
currentopt+=( "${cmd_update_linuxgsm[@]}" ) currentopt+=( "${cmd_update_linuxgsm[@]}" )
# Exclude noupdate games here # Exclude noupdate games here
if [ "${gamename}" != "Battlefield: 1942" ]&&[ "${engine}" != "quake" ]&&[ "${engine}" != "idtech2" ]&&[ "${engine}" != "idtech3" ]&&[ "${engine}" != "iw2.0" ]&&[ "${engine}" != "iw3.0" ]&&[ "${gamename}" != "San Andreas Multiplayer" ]; then if [ "${engine}" != "quake" ]&&[ "${engine}" != "idtech2" ]&&[ "${engine}" != "idtech3" ]&&[ "${engine}" != "iw2.0" ]&&[ "${engine}" != "iw3.0" ]&&[ "${shortname}" != "bf1942" ]&&[ "${shortname}" != "samp" ]; then
currentopt+=( "${cmd_update[@]}" ) currentopt+=( "${cmd_update[@]}" )
# force update for SteamCMD only or MTA # force update for SteamCMD only or MTA
if [ -n "${appid}" ]||[ "${gamename}" == "Multi Theft Auto" ]; then if [ -n "${appid}" ]||[ "${shortname}" == "mta" ]; then
currentopt+=( "${cmd_force_update[@]}" ) currentopt+=( "${cmd_force_update[@]}" )
fi fi
fi fi
@ -78,7 +78,7 @@ fi
currentopt+=( "${cmd_backup[@]}" ) currentopt+=( "${cmd_backup[@]}" )
# Exclude games without a console # Exclude games without a console
if [ "${gamename}" != "TeamSpeak 3" ]; then if [ "${shortname}" != "ts3" ]; then
currentopt+=( "${cmd_console[@]}" "${cmd_debug[@]}" ) currentopt+=( "${cmd_console[@]}" "${cmd_debug[@]}" )
fi fi
@ -90,16 +90,16 @@ if [ "${engine}" == "source" ]; then
fi fi
# TeamSpeak exclusive # TeamSpeak exclusive
if [ "${gamename}" == "TeamSpeak 3" ]; then if [ "${shortname}" != "ts3" ]; then
currentopt+=( "${cmd_change_password[@]}" ) currentopt+=( "${cmd_change_password[@]}" )
fi fi
# Unreal exclusive # Unreal exclusive
if [ "${gamename}" == "Rust" ]; then if [ "${shortname}" == "rust" ]; then
currentopt+=( "${cmd_wipe[@]}" "${cmd_wipeall[@]}" ) currentopt+=( "${cmd_wipe[@]}" "${cmd_wipeall[@]}" )
fi fi
if [ "${engine}" == "unreal2" ]; then if [ "${engine}" == "unreal2" ]; then
if [ "${gamename}" == "Unreal Tournament 2004" ]; then if [ "${shortname}" == "ut2k4" ]; then
currentopt+=( "${cmd_install_cdkey[@]}" "${cmd_map_compressor_u2[@]}" ) currentopt+=( "${cmd_install_cdkey[@]}" "${cmd_map_compressor_u2[@]}" )
else else
currentopt+=( "${cmd_map_compressor_u2[@]}" ) currentopt+=( "${cmd_map_compressor_u2[@]}" )
@ -110,22 +110,22 @@ if [ "${engine}" == "unreal" ]; then
fi fi
# DST exclusive # DST exclusive
if [ "${gamename}" == "Don't Starve Together" ]; then if [ "${shortname}" == "dst" ]; then
currentopt+=( "${cmd_install_dst_token[@]}" ) currentopt+=( "${cmd_install_dst_token[@]}" )
fi fi
# MTA exclusive # MTA exclusive
if [ "${gamename}" == "Multi Theft Auto" ]; then if [ "${shortname}" == "mta" ]; then
currentopt+=( "${cmd_install_default_resources[@]}" ) currentopt+=( "${cmd_install_default_resources[@]}" )
fi fi
# Squad license exclusive # Squad license exclusive
if [ "${gamename}" == "Squad" ]; then if [ "${shortname}" == "squad" ]; then
currentopt+=( "${cmd_install_squad_license[@]}" ) currentopt+=( "${cmd_install_squad_license[@]}" )
fi fi
## Mods commands ## Mods commands
if [ "${engine}" == "source" ]||[ "${gamename}" == "Rust" ]||[ "${gamename}" == "Hurtworld" ]||[ "${gamename}" == "7 Days To Die" ]; then if [ "${engine}" == "source" ]||[ "${shortname}" == "rust" ]||[ "${shortname}" == "hq" ]||[ "${shortname}" == "sdtd" ]; then
currentopt+=( "${cmd_mods_install[@]}" "${cmd_mods_remove[@]}" "${cmd_mods_update[@]}" ) currentopt+=( "${cmd_mods_install[@]}" "${cmd_mods_remove[@]}" "${cmd_mods_update[@]}" )
fi fi

28
lgsm/functions/fix.sh

@ -42,25 +42,25 @@ if [ "${function_selfname}" != "command_install.sh" ]&&[ -z "${fixbypass}" ]; th
fix_steamcmd.sh fix_steamcmd.sh
fi fi
if [ "${gamename}" == "ARMA 3" ]; then if [ "${shortname}" == "arma3" ]; then
fix_arma3.sh fix_arma3.sh
elif [ "${shortname}" == "ark" ]; then elif [ "${shortname}" == "ark" ]; then
fix_ark.sh fix_ark.sh
elif [ "${gamename}" == "Counter-Strike: Global Offensive" ]; then elif [ "${shortname}" == "csgo" ]; then
fix_csgo.sh fix_csgo.sh
elif [ "${gamename}" == "Don't Starve Together" ]; then elif [ "${shortname}" == "dst" ]; then
fix_dst.sh fix_dst.sh
elif [ "${gamename}" == "GoldenEye: Source" ]; then elif [ "${shortname}" == "ges" ]; then
fix_ges.sh fix_ges.sh
elif [ "${gamename}" == "Insurgency" ]; then elif [ "${shortname}" == "ins" ]; then
fix_ins.sh fix_ins.sh
elif [ "${gamename}" == "Rust" ]; then elif [ "${shortname}" == "rust" ]; then
fix_rust.sh fix_rust.sh
elif [ "${shortname}" == "rw" ]; then elif [ "${shortname}" == "rw" ]; then
fix_rw.sh fix_rw.sh
elif [ "${shortname}" == "ss3" ]; then elif [ "${shortname}" == "ss3" ]; then
fix_ss3.sh fix_ss3.sh
elif [ "${gamename}" == "Multi Theft Auto" ]; then elif [ "${shortname}" == "mta" ]; then
fix_mta.sh fix_mta.sh
elif [ "${shortname}" == "wurm" ]; then elif [ "${shortname}" == "wurm" ]; then
fix_wurm.sh fix_wurm.sh
@ -73,19 +73,19 @@ if [ "${function_selfname}" == "command_install.sh" ]; then
echo "Applying Post-Install Fixes" echo "Applying Post-Install Fixes"
echo "=================================" echo "================================="
sleep 0.5 sleep 0.5
if [ "${gamename}" == "Killing Floor" ]; then if [ "${shortname}" == "kf" ]; then
fix_kf.sh fix_kf.sh
elif [ "${gamename}" == "Killing Floor 2" ]; then elif [ "${shortname}" == "kf2" ]; then
fix_kf2.sh fix_kf2.sh
elif [ "${gamename}" == "Red Orchestra: Ostfront 41-45" ]; then elif [ "${shortname}" == "ro" ]; then
fix_ro.sh fix_ro.sh
elif [ "${gamename}" == "Unreal Tournament 2004" ]; then elif [ "${shortname}" == "ut2k4" ]; then
fix_ut2k4.sh fix_ut2k4.sh
elif [ "${gamename}" == "Unreal Tournament" ]; then elif [ "${shortname}" == "ut" ]; then
fix_ut.sh fix_ut.sh
elif [ "${gamename}" == "Unreal Tournament 3" ]; then elif [ "${shortname}" == "ut3" ]; then
fix_ut3.sh fix_ut3.sh
elif [ "${gamename}" == "Team Fortress 2" ]; then elif [ "${shortname}" == "tf2" ]; then
fix_tf2.sh fix_tf2.sh
else else
fn_print_information_nl "No fixes required." fn_print_information_nl "No fixes required."

6
lgsm/functions/fix_steamcmd.sh

@ -17,7 +17,7 @@ if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then
fn_fix_msg_end fn_fix_msg_end
fi fi
if [ "${gamename}" == "Serious Sam 3: BFE" ]; then if [ "${shortname}" == "ss3" ]; then
# Fixes: .steam/bin32/libsteam.so: cannot open shared object file: No such file or directory # Fixes: .steam/bin32/libsteam.so: cannot open shared object file: No such file or directory
if [ ! -f "${HOME}/.steam/bin32/libsteam.so" ]; then if [ ! -f "${HOME}/.steam/bin32/libsteam.so" ]; then
fixname="libsteam.so" fixname="libsteam.so"
@ -26,7 +26,7 @@ if [ "${gamename}" == "Serious Sam 3: BFE" ]; then
cp -v "${serverfiles}/Bin/libsteam.so" "${HOME}/.steam/bin32/libsteam.so" >> "${lgsmlog}" cp -v "${serverfiles}/Bin/libsteam.so" "${HOME}/.steam/bin32/libsteam.so" >> "${lgsmlog}"
fn_fix_msg_end fn_fix_msg_end
fi fi
elif [ "${gamename}" == "Hurtworld" ]; then elif [ "${shortname}" == "hw" ]; then
# Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so. # Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
if [ ! -f "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" ]; then if [ ! -f "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" ]; then
fixname="steamclient.so x86" fixname="steamclient.so x86"
@ -40,7 +40,7 @@ elif [ "${gamename}" == "Hurtworld" ]; then
cp -v "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}" cp -v "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}"
fn_fix_msg_end fn_fix_msg_end
fi fi
elif [ "${gamename}" == "Tower Unite" ]; then elif [ "${shortname}" == "tu" ]; then
# Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so. # Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
if [ ! -f "${executabledir}/steamclient.so" ]; then if [ ! -f "${executabledir}/steamclient.so" ]; then
fixname="steamclient.so" fixname="steamclient.so"

88
lgsm/functions/info_config.sh

@ -612,6 +612,21 @@ fn_info_config_seriousengine35(){
fi fi
} }
#StickyBots
fn_info_config_sbots(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
maxplayers="${unavailable}"
else
servername="$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=";,:' | sed -e 's/^[ \t]//' -e 's/[ \t]*$//')"
maxplayers="$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]')"
fi
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
maxplayers=${maxplayers:-"0"}
}
fn_info_config_source(){ fn_info_config_source(){
if [ ! -f "${servercfgfullpath}" ]; then if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}" servername="${unavailable}"
@ -1112,106 +1127,109 @@ fn_info_config_stationeers(){
} }
# ARK: Survival Evolved # ARK: Survival Evolved
if [ "${gamename}" == "ARK: Survivial Evolved" ]; then if [ "${shortname}" == "ark" ]; then
fn_info_config_ark fn_info_config_ark
# Ballistic Overkill # Ballistic Overkill
elif [ "${gamename}" == "Ballistic Overkill" ]; then elif [ "${shortname}" == "bo" ]; then
fn_info_config_ballistic_overkill fn_info_config_ballistic_overkill
# Battalion 1944 # Battalion 1944
elif [ "${gamename}" == "Battalion 1944" ]; then elif [ "${shortname}" == "bt1944" ]; then
fn_info_config_battalion1944 fn_info_config_battalion1944
# Battlefield: 1942 # Battlefield: 1942
elif [ "${gamename}" == "Battlefield: 1942" ]; then elif [ "${shortname}" == "bf1942" ]; then
fn_info_config_bf1942 fn_info_config_bf1942
# Call of Duty # Call of Duty
elif [ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]; then elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]; then
fn_info_config_cod fn_info_config_cod
# Call of Duty 2 # Call of Duty 2
elif [ "${gamename}" == "Call of Duty 2" ]; then elif [ "${shortname}" == "cod2" ]; then
fn_info_config_cod2 fn_info_config_cod2
# Call of Duty 4 # Call of Duty 4
elif [ "${gamename}" == "Call of Duty 4" ]; then elif [ "${shortname}" == "cod4" ]; then
fn_info_config_cod4 fn_info_config_cod4
# Call of Duty: World at War # Call of Duty: World at War
elif [ "${gamename}" == "Call of Duty: World at War" ]; then elif [ "${shortname}" == "codwaw" ]; then
fn_info_config_codwaw fn_info_config_codwaw
# Dont Starve Together # Dont Starve Together
elif [ "${engine}" == "dontstarve" ]; then elif [ "${shortname}" == "dst" ]; then
fn_info_config_dontstarve fn_info_config_dontstarve
# Eco # Eco
elif [ "${shortname}" == "eco" ]; then elif [ "${shortname}" == "eco" ]; then
fn_info_config_eco fn_info_config_eco
# Factorio # Factorio
elif [ "${gamename}" == "Factorio" ]; then elif [ "${shortname}" == "fctr" ]; then
fn_info_config_factorio fn_info_config_factorio
# Insurgency: Sandstorm # Insurgency: Sandstorm
elif [ "${shortname}" == "inss" ]; then elif [ "${shortname}" == "inss" ]; then
fn_info_config_inss fn_info_config_inss
# Just Cause 2 # Just Cause 2
elif [ "${gamename}" == "Just Cause 2" ]; then elif [ "${shortname}" == "jc2" ]; then
fn_info_config_justcause2 fn_info_config_justcause2
# Just Cause 3 # Just Cause 3
elif [ "${gamename}" == "Just Cause 3" ]; then elif [ "${shortname}" == "jc3" ]; then
fn_info_config_justcause3 fn_info_config_justcause3
# Killing Floor 2 # Killing Floor 2
elif [ "${shortname}" == "kf2" ]; then elif [ "${shortname}" == "kf2" ]; then
fn_info_config_kf2 fn_info_config_kf2
# QuakeWorld # QuakeWorld
elif [ "${gamename}" == "QuakeWorld" ]; then elif [ "${shortname}" == "qw" ]; then
fn_info_config_quakeworld fn_info_config_quakeworld
# Quake 2 # Quake 2
elif [ "${gamename}" == "Quake 2" ]; then elif [ "${shortname}" == "q2" ]; then
fn_info_config_quake2 fn_info_config_quake2
# Quake 3 # Quake 3
elif [ "${gamename}" == "Quake 3: Arena" ]; then elif [ "${shortname}" == "q3" ]; then
fn_info_config_quake3 fn_info_config_quake3
# Quake Live # Quake Live
elif [ "${gamename}" == "Quake Live" ]; then elif [ "${shortname}" == "ql" ]; then
fn_info_config_quakelive fn_info_config_quakelive
# Minecraft # Minecraft
elif [ "${engine}" == "lwjgl2" ]; then elif [ "${shortname}" == "mc" ]; then
fn_info_config_minecraft fn_info_config_minecraft
# Post Scriptum: The Bloody Seventh # Post Scriptum: The Bloody Seventh
elif [ "${shortname}" == "pstbs" ]; then elif [ "${shortname}" == "pstbs" ]; then
fn_info_config_pstbs fn_info_config_pstbs
# Project Cars # Project Cars
elif [ "${gamename}" == "Project Cars" ]; then elif [ "${shortname}" == "pc" ]; then
fn_info_config_projectcars fn_info_config_projectcars
# Project Zomboid # Project Zomboid
elif [ "${engine}" == "projectzomboid" ]; then elif [ "${shortname}" == "pz" ]; then
fn_info_config_projectzomboid fn_info_config_projectzomboid
# ARMA 3 # ARMA 3
elif [ "${engine}" == "realvirtuality" ]; then elif [ "${shortname}" == "arma3" ]; then
fn_info_config_realvirtuality fn_info_config_realvirtuality
# Rising World # Rising World
elif [ "${shortname}" == "rw" ]; then elif [ "${shortname}" == "rw" ]; then
fn_info_config_risingworld fn_info_config_risingworld
# Serious Sam # Serious Sam
elif [ "${engine}" == "seriousengine35" ]; then elif [ "${shortname}" == "ss3" ]; then
fn_info_config_seriousengine35 fn_info_config_seriousengine35
# Source Engine Games # Source Engine Games
elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
fn_info_config_source fn_info_config_source
# Starbound # Starbound
elif [ "${engine}" == "starbound" ]; then elif [ "${shortname}" == "sb" ]; then
fn_info_config_starbound fn_info_config_starbound
# TeamSpeak 3 # TeamSpeak 3
elif [ "${gamename}" == "TeamSpeak 3" ]; then elif [ "${shortname}" == "ts3" ]; then
fn_info_config_teamspeak3 fn_info_config_teamspeak3
# Mumble # Mumble
elif [ "${gamename}" == "Mumble" ]; then elif [ "${shortname}" == "mumble" ]; then
fn_info_config_mumble fn_info_config_mumble
# San Andreas Multiplayer # San Andreas Multiplayer
elif [ "${gamename}" == "San Andreas Multiplayer" ]; then elif [ "${shortname}" == "samp" ]; then
fn_info_config_samp fn_info_config_samp
# StickyBots
elif [ "${shortname}" == "pstbs" ]; then
fn_info_config_sbots
# Teeworlds # Teeworlds
elif [ "${engine}" == "teeworlds" ]; then elif [ "${shortname}" == "tw" ]; then
fn_info_config_teeworlds fn_info_config_teeworlds
# Terraria # Terraria
elif [ "${engine}" == "terraria" ]; then elif [ "${shortname}" == "terraria" ]; then
fn_info_config_terraria fn_info_config_terraria
# Tower Unite # Tower Unite
elif [ "${gamename}" == "Tower Unite" ]; then elif [ "${shortname}" == "tu" ]; then
fn_info_config_towerunite fn_info_config_towerunite
# Unreal/Unreal 2 engine # Unreal/Unreal 2 engine
elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
@ -1220,19 +1238,19 @@ elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
elif [ "${engine}" == "unreal3" ]; then elif [ "${engine}" == "unreal3" ]; then
fn_info_config_unreal3 fn_info_config_unreal3
# 7 Day To Die (unity3d) # 7 Day To Die (unity3d)
elif [ "${gamename}" == "7 Days To Die" ]; then elif [ "${shortname}" == "sdtd" ]; then
fn_info_config_sdtd fn_info_config_sdtd
elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then elif [ "${shortname}" == "wet" ]; then
fn_info_config_wolfensteinenemyterritory fn_info_config_wolfensteinenemyterritory
elif [ "${gamename}" == "ET: Legacy" ]; then elif [ "${shortname}" == "etl" ]; then
fn_info_config_etlegacy fn_info_config_etlegacy
elif [ "${gamename}" == "Wurm Unlimited" ]; then elif [ "${shortname}" == "wurm" ]; then
fn_info_config_wurmunlimited fn_info_config_wurmunlimited
elif [ "${gamename}" == "Multi Theft Auto" ]; then elif [ "${shortname}" == "mta" ]; then
fn_info_config_mta fn_info_config_mta
elif [ "${gamename}" == "Squad" ]; then elif [ "${shortname}" == "squad" ]; then
fn_info_config_squad fn_info_config_squad
# Stationeers # Stationeers
elif [ "${gamename}" == "Stationeers" ]; then elif [ "${shortname}" == "st" ]; then
fn_info_config_stationeers fn_info_config_stationeers
fi fi

3
lgsm/functions/info_glibc.sh

@ -114,6 +114,9 @@ elif [ "${gamename}" == "Squad" ]; then
elif [ "${gamename}" == "Sven Co-op" ]; then elif [ "${gamename}" == "Sven Co-op" ]; then
glibcrequired="2.18" glibcrequired="2.18"
glibcfix="no" glibcfix="no"
elif [ "${shortname}" == "sbots" ]; then
glibcrequired="2.17"
glibcfix="no"
elif [ "${gamename}" == "Team Fortress 2" ]; then elif [ "${gamename}" == "Team Fortress 2" ]; then
glibcrequired="2.15" glibcrequired="2.15"
glibcfix="yes" glibcfix="yes"

21
lgsm/functions/info_messages.sh

@ -231,7 +231,10 @@ fn_info_message_gameserver(){
echo -e "${blue}Current Scenario:\t${default}${gdgamemode}" echo -e "${blue}Current Scenario:\t${default}${gdgamemode}"
fi fi
else else
echo -e "${blue}Current Game Mode:\t${default}${gdgamemode}" # Current Scenario
if [ -n "${gdgamemode}" ]; then
echo -e "${blue}Current Game Mode:\t${default}${gdgamemode}"
fi
fi fi
# Default Map # Default Map
@ -746,7 +749,7 @@ fn_info_message_mumble(){
echo -e "> ServerQuery\tINBOUND\t${port}\ttcp" echo -e "> ServerQuery\tINBOUND\t${port}\ttcp"
} | column -s $'\t' -t } | column -s $'\t' -t
} }
fn_info_Message_pstbs(){ fn_info_message_pstbs(){
echo -e "netstat -atunp | grep PostScriptum" echo -e "netstat -atunp | grep PostScriptum"
echo -e "" echo -e ""
{ {
@ -889,6 +892,16 @@ fn_info_message_seriousengine35(){
} | column -s $'\t' -t } | column -s $'\t' -t
} }
fn_info_message_sbots(){
echo -e "netstat -atunp | grep blank1"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
} | column -s $'\t' -t
}
fn_info_message_sdtd(){ fn_info_message_sdtd(){
fn_info_message_password_strip fn_info_message_password_strip
echo -e "netstat -atunp | grep 7DaysToDie" echo -e "netstat -atunp | grep 7DaysToDie"
@ -1182,7 +1195,7 @@ fn_info_message_select_engine(){
elif [ "${shortname}" == "kf2" ]; then elif [ "${shortname}" == "kf2" ]; then
fn_info_message_kf2 fn_info_message_kf2
elif [ "${shortname}" == "pstbs" ]; then elif [ "${shortname}" == "pstbs" ]; then
fn_info_Message_pstbs fn_info_message_pstbs
elif [ "${gamename}" == "Project Cars" ]; then elif [ "${gamename}" == "Project Cars" ]; then
fn_info_message_projectcars fn_info_message_projectcars
elif [ "${gamename}" == "QuakeWorld" ]; then elif [ "${gamename}" == "QuakeWorld" ]; then
@ -1199,6 +1212,8 @@ fn_info_message_select_engine(){
fn_info_message_squad fn_info_message_squad
elif [ "${gamename}" == "Stationeers" ]; then elif [ "${gamename}" == "Stationeers" ]; then
fn_info_message_stationeers fn_info_message_stationeers
elif [ "${shortname}" == "sbots" ]; then
fn_info_message_sbots
elif [ "${gamename}" == "TeamSpeak 3" ]; then elif [ "${gamename}" == "TeamSpeak 3" ]; then
fn_info_message_teamspeak3 fn_info_message_teamspeak3
elif [ "${gamename}" == "Tower Unite" ]; then elif [ "${gamename}" == "Tower Unite" ]; then

34
lgsm/functions/info_parms.sh

@ -125,6 +125,15 @@ fn_info_parms_spark(){
mods=${mods:-"NOT SET"} mods=${mods:-"NOT SET"}
} }
fn_info_parms_stickybots(){
port=${port:-"0"}
queryport=${queryport:-"0"}
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
defaultmap=${defaultmap:-"NOT SET"}
maxplayers=${maxplayers:-"0"}
}
fn_info_config_towerunite(){ fn_info_config_towerunite(){
port=${port:-"0"} port=${port:-"0"}
queryport=${queryport:-"0"} queryport=${queryport:-"0"}
@ -154,46 +163,49 @@ fn_info_parms_kf2(){
} }
# ARK: Survival Evolved # ARK: Survival Evolved
if [ "${gamename}" == "ARK: Survival Evolved" ]; then if [ "${shortname}" == "ark" ]; then
fn_info_parms_ark fn_info_parms_ark
# ARMA 3 # ARMA 3
elif [ "${engine}" == "realvirtuality" ]; then elif [ "${shortname}" == "arma3" ]; then
fn_info_parms_realvirtuality fn_info_parms_realvirtuality
# Call of Duty # Call of Duty
elif [ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]||[ "${engine}" == "iw2.0" ]||[ "${engine}" == "iw3.0" ]; then elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]||[ "${engine}" == "iw2.0" ]||[ "${engine}" == "iw3.0" ]; then
fn_info_parms_cod fn_info_parms_cod
# Eco # Eco
elif [ "${gamename}" == "Eco" ]; then elif [ "${shortname}" == "eco" ]; then
fn_info_parms_eco fn_info_parms_eco
# Factorio # Factorio
elif [ "${gamename}" == "Factorio" ]; then elif [ "${shortname}" == "fctr" ]; then
fn_info_parms_factorio fn_info_parms_factorio
elif [ "${shortname}" == "inss" ]; then elif [ "${shortname}" == "inss" ]; then
fn_info_parms_inss fn_info_parms_inss
elif [ "${shortname}" == "kf2" ]; then elif [ "${shortname}" == "kf2" ]; then
fn_info_parms_kf2 fn_info_parms_kf2
# Project Zomboid # Project Zomboid
elif [ "${engine}" == "projectzomboid" ]; then elif [ "${shortname}" == "pz" ]; then
fn_info_parms_projectzomboid fn_info_parms_projectzomboid
elif [ "${gamename}" == "QuakeWorld" ]; then elif [ "${shortname}" == "qw" ]; then
fn_info_parms_quakeworld fn_info_parms_quakeworld
elif [ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]; then elif [ "${shortname}" == "q2" ]||[ "${shortname}" == "q3" ]; then
fn_info_parms_quake2 fn_info_parms_quake2
# Rust # Rust
elif [ "${gamename}" == "Rust" ]; then elif [ "${shortname}" == "rust" ]; then
fn_info_parms_rust fn_info_parms_rust
# Rising World # Rising World
elif [ "${shortname}" == "rw" ]; then elif [ "${shortname}" == "rw" ]; then
fn_info_parms_risingworld fn_info_parms_risingworld
# Sticky Bots
elif [ "${shortname}" == "sbots" ]; then
fn_info_parms_stickybots
# Serious Sam # Serious Sam
elif [ "${engine}" == "seriousengine35" ]; then elif [ "${shortname}" == "ss3" ]; then
fn_info_config_seriousengine35 fn_info_config_seriousengine35
elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
fn_info_parms_source fn_info_parms_source
# Spark # Spark
elif [ "${engine}" == "spark" ]; then elif [ "${engine}" == "spark" ]; then
fn_info_parms_spark fn_info_parms_spark
elif [ "${gamename}" == "Tower Unite" ]; then elif [ "${shortname}" == "tu" ]; then
fn_info_config_towerunite fn_info_config_towerunite
# Unreal/Unreal 2 engine # Unreal/Unreal 2 engine
elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then

2
lgsm/functions/mods_core.sh

@ -43,7 +43,7 @@ fn_mod_lowercase(){
fileswc=$(find "${extractdir}" -depth | wc -l) fileswc=$(find "${extractdir}" -depth | wc -l)
echo -en "\r" echo -en "\r"
while read -r src; do while read -r src; do
dst=$(dirname "${src}"`/`basename "${src}" | tr '[A-Z]' '[a-z]') dst=$(dirname "${src}"$(/)basename "${src}" | tr 'A-Z' 'a-z')
if [ "${src}" != "${dst}" ] if [ "${src}" != "${dst}" ]
then then
[ ! -e "${dst}" ] && mv -T "${src}" "${dst}" || echo "${src} was not renamed" [ ! -e "${dst}" ] && mv -T "${src}" "${dst}" || echo "${src} was not renamed"

12
lgsm/functions/query_gamedig.sh

@ -89,37 +89,37 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ];
# server name # server name
gdname=$(echo "${gamedigraw}" | jq -re '.name') gdname=$(echo "${gamedigraw}" | jq -re '.name')
if [ "${gdname}" == "null" ]; then if [ "${gdname}" == "null" ]; then
gdname= unset gdname
fi fi
# numplayers # numplayers
gdplayers=$(echo "${gamedigraw}" | jq -re '.players|length') gdplayers=$(echo "${gamedigraw}" | jq -re '.players|length')
if [ "${gdplayers}" == "null" ]; then if [ "${gdplayers}" == "null" ]; then
gdplayers= unset gdplayers
fi fi
# maxplayers # maxplayers
gdmaxplayers=$(echo "${gamedigraw}" | jq -re '.maxplayers|length') gdmaxplayers=$(echo "${gamedigraw}" | jq -re '.maxplayers|length')
if [ "${gdmaxplayers}" == "null" ]; then if [ "${gdmaxplayers}" == "null" ]; then
maxplayers= unset maxplayers
fi fi
# current map # current map
gdmap=$(echo "${gamedigraw}" | jq -re '.map') gdmap=$(echo "${gamedigraw}" | jq -re '.map')
if [ "${gdmap}" == "null" ]; then if [ "${gdmap}" == "null" ]; then
gdmap= unset gdmap
fi fi
# current gamemode # current gamemode
gdgamemode=$(echo "${gamedigraw}" | jq -re '.raw.rules.GameMode_s') gdgamemode=$(echo "${gamedigraw}" | jq -re '.raw.rules.GameMode_s')
if [ "${gdgamemode}" == "null" ]; then if [ "${gdgamemode}" == "null" ]; then
gdgamemode= unset gdgamemode
fi fi
# numbots # numbots
gdbots=$(echo "${gamedigraw}" | jq -re '.raw.numbots') gdbots=$(echo "${gamedigraw}" | jq -re '.raw.numbots')
if [ "${gdbots}" == "null" ]; then if [ "${gdbots}" == "null" ]; then
gdbots= unset gdbots
fi fi
fi fi
fi fi

4
lgsm/functions/update_ts3.sh

@ -63,7 +63,7 @@ fn_update_ts3_currentbuild(){
fi fi
# Get current build from logs # Get current build from logs
currentbuild=$(cat $(find ./* -name 'ts3server*_0.log' 2> /dev/null | sort | grep -Ev '${rootdir}/.ts3version' | tail -1) | grep -Eo 'TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | grep -Eo '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | sort -V | tail -1) currentbuild=$(cat $(find ./* -name "ts3server*_0.log" 2> /dev/null | sort | grep -Ev "${rootdir}/.ts3version" | tail -1) | grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | sort -V | tail -1)
if [ -z "${currentbuild}" ]; then if [ -z "${currentbuild}" ]; then
fn_print_error_nl "Checking for update: teamspeak.com: Current build version not found" fn_print_error_nl "Checking for update: teamspeak.com: Current build version not found"
fn_script_log_error "Checking for update: teamspeak.com: Current build version not found" fn_script_log_error "Checking for update: teamspeak.com: Current build version not found"
@ -74,7 +74,7 @@ fn_update_ts3_currentbuild(){
command_stop.sh command_stop.sh
exitbypass=1 exitbypass=1
command_start.sh command_start.sh
currentbuild=$(cat $(find ./* -name 'ts3server*_0.log' 2> /dev/null | sort | grep -Ev '${rootdir}/.ts3version' | tail -1) | grep -Eo 'TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | grep -Eo '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}') currentbuild=$(cat $(find ./* -name "ts3server*_0.log" 2> /dev/null | sort | grep -Ev "${rootdir}/.ts3version" | tail -1) | grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}")
if [ -z "${currentbuild}" ]; then if [ -z "${currentbuild}" ]; then
fn_print_fail_nl "Checking for update: teamspeak.com: Current build version still not found" fn_print_fail_nl "Checking for update: teamspeak.com: Current build version still not found"
fn_script_log_fatal "Checking for update: teamspeak.com: Current build version still not found" fn_script_log_fatal "Checking for update: teamspeak.com: Current build version still not found"

Loading…
Cancel
Save