Browse Source

Merge branch 'release/180318'

pull/1862/head 180318
Daniel Gibbs 7 years ago
parent
commit
9361047e9b
  1. 13
      .travis.yml
  2. 2
      CONTRIBUTING.md
  3. 2
      lgsm/config-default/config-lgsm/bb2server/_default.cfg
  4. 118
      lgsm/config-default/config-lgsm/bdserver/_default.cfg
  5. 2
      lgsm/config-default/config-lgsm/bmdmserver/_default.cfg
  6. 2
      lgsm/config-default/config-lgsm/boserver/_default.cfg
  7. 120
      lgsm/config-default/config-lgsm/bt1944server/_default.cfg
  8. 2
      lgsm/config-default/config-lgsm/csgoserver/_default.cfg
  9. 2
      lgsm/config-default/config-lgsm/cssserver/_default.cfg
  10. 2
      lgsm/config-default/config-lgsm/emserver/_default.cfg
  11. 2
      lgsm/config-default/config-lgsm/gmodserver/_default.cfg
  12. 2
      lgsm/config-default/config-lgsm/insserver/_default.cfg
  13. 2
      lgsm/config-default/config-lgsm/nmrihserver/_default.cfg
  14. 12
      lgsm/config-default/config-lgsm/rustserver/_default.cfg
  15. 2
      lgsm/config-default/config-lgsm/tf2server/_default.cfg
  16. 2
      lgsm/config-default/config-lgsm/tuserver/_default.cfg
  17. 2
      lgsm/config-default/config-lgsm/zpsserver/_default.cfg
  18. 2
      lgsm/data/serverlist.csv
  19. 2
      lgsm/functions/alert.sh
  20. 2
      lgsm/functions/alert_discord.sh
  21. 2
      lgsm/functions/alert_email.sh
  22. 2
      lgsm/functions/alert_ifttt.sh
  23. 2
      lgsm/functions/alert_mailgun.sh
  24. 2
      lgsm/functions/alert_pushbullet.sh
  25. 2
      lgsm/functions/alert_pushover.sh
  26. 2
      lgsm/functions/check.sh
  27. 2
      lgsm/functions/check_config.sh
  28. 6
      lgsm/functions/check_deps.sh
  29. 2
      lgsm/functions/check_executable.sh
  30. 4
      lgsm/functions/check_glibc.sh
  31. 13
      lgsm/functions/check_ip.sh
  32. 2
      lgsm/functions/check_logs.sh
  33. 2
      lgsm/functions/check_permissions.sh
  34. 4
      lgsm/functions/check_root.sh
  35. 2
      lgsm/functions/check_status.sh
  36. 2
      lgsm/functions/check_steamcmd.sh
  37. 2
      lgsm/functions/check_system_dir.sh
  38. 2
      lgsm/functions/check_system_requirements.sh
  39. 2
      lgsm/functions/check_tmuxception.sh
  40. 2
      lgsm/functions/command_backup.sh
  41. 2
      lgsm/functions/command_console.sh
  42. 2
      lgsm/functions/command_debug.sh
  43. 2
      lgsm/functions/command_details.sh
  44. 2
      lgsm/functions/command_dev_debug.sh
  45. 6
      lgsm/functions/command_dev_detect_deps.sh
  46. 6
      lgsm/functions/command_dev_detect_glibc.sh
  47. 6
      lgsm/functions/command_dev_detect_ldd.sh
  48. 12
      lgsm/functions/command_fastdl.sh
  49. 2
      lgsm/functions/command_install.sh
  50. 2
      lgsm/functions/command_install_resources_mta.sh
  51. 2
      lgsm/functions/command_mods_install.sh
  52. 6
      lgsm/functions/command_mods_remove.sh
  53. 6
      lgsm/functions/command_mods_update.sh
  54. 4
      lgsm/functions/command_monitor.sh
  55. 2
      lgsm/functions/command_postdetails.sh
  56. 2
      lgsm/functions/command_restart.sh
  57. 16
      lgsm/functions/command_start.sh
  58. 8
      lgsm/functions/command_stop.sh
  59. 2
      lgsm/functions/command_test_alert.sh
  60. 4
      lgsm/functions/command_ts3_server_pass.sh
  61. 2
      lgsm/functions/command_update.sh
  62. 2
      lgsm/functions/command_update_functions.sh
  63. 2
      lgsm/functions/command_update_linuxgsm.sh
  64. 4
      lgsm/functions/command_validate.sh
  65. 2
      lgsm/functions/command_wipe.sh
  66. 4
      lgsm/functions/compress_unreal2_maps.sh
  67. 2
      lgsm/functions/compress_ut99_maps.sh
  68. 14
      lgsm/functions/core_dl.sh
  69. 6
      lgsm/functions/core_exit.sh
  70. 2
      lgsm/functions/core_functions.sh
  71. 4
      lgsm/functions/core_getopt.sh
  72. 2
      lgsm/functions/core_legacy.sh
  73. 2
      lgsm/functions/core_messages.sh
  74. 2
      lgsm/functions/core_trap.sh
  75. 2
      lgsm/functions/fix.sh
  76. 2
      lgsm/functions/fix_ark.sh
  77. 2
      lgsm/functions/fix_arma3.sh
  78. 2
      lgsm/functions/fix_coduo.sh
  79. 2
      lgsm/functions/fix_csgo.sh
  80. 2
      lgsm/functions/fix_dst.sh
  81. 2
      lgsm/functions/fix_ges.sh
  82. 2
      lgsm/functions/fix_glibc.sh
  83. 2
      lgsm/functions/fix_ins.sh
  84. 2
      lgsm/functions/fix_kf.sh
  85. 2
      lgsm/functions/fix_kf2.sh
  86. 2
      lgsm/functions/fix_mta.sh
  87. 2
      lgsm/functions/fix_ro.sh
  88. 2
      lgsm/functions/fix_rust.sh
  89. 2
      lgsm/functions/fix_steamcmd.sh
  90. 2
      lgsm/functions/fix_ut.sh
  91. 2
      lgsm/functions/fix_ut2k4.sh
  92. 4
      lgsm/functions/gsquery.py
  93. 19
      lgsm/functions/info_config.sh
  94. 4
      lgsm/functions/info_distro.sh
  95. 8
      lgsm/functions/info_glibc.sh
  96. 20
      lgsm/functions/info_messages.sh
  97. 2
      lgsm/functions/info_parms.sh
  98. 2
      lgsm/functions/install_complete.sh
  99. 18
      lgsm/functions/install_config.sh
  100. 6
      lgsm/functions/install_dst_token.sh

13
.travis.yml

@ -30,8 +30,13 @@ addons:
- libstdc++6:i386
- net-tools
- iproute2
- shellcheck
script:
- bash tests/tests_jc2server.sh
- bash tests/tests_ts3server.sh
jobs:
include:
- stage: jobs
script: bash tests/tests_jc2server.sh
- # stage name not required
script: bash tests/tests_ts3server.sh
- # stage name not required
script: bash tests/tests_shellcheck.sh

2
CONTRIBUTING.md

@ -2,7 +2,7 @@
We are really glad you're reading this, because if you are then you have shown an interest in helping make LinuxGSM great.
If you haven't already, come find us on [Discord](https://gameservermanagers.com/discord). From there you will have contact with other contributers of the project. We want you working on things you're excited about.
If you haven't already, come find us on [Discord](https://linuxgsm.com/discord). From there you will have contact with other contributers of the project. We want you working on things you're excited about.
Before working on a project we recommend that you create a issue in regards to the issue/feature. This will prevent duplicates while you work on the feature. If an issue already exists, make note that you are working on it so nobody else wastes their time working on the same project at the same time!

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

@ -18,7 +18,7 @@ maxplayers="20"
## Optional: Game Server Login Token
# GSLT can be used for running a public server.
# More info: https://gameservermanagers.com/gslt
# More info: https://linuxgsm.com/gslt
gslt=""
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters

118
lgsm/config-default/config-lgsm/bdserver/_default.cfg

@ -0,0 +1,118 @@
##################################
######## 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
ip="0.0.0.0"
port="27015"
clientport="27005"
defaultmap="pve_tomb"
maxplayers="3"
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
fn_parms(){
parms="-game bdef -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
}
#### 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
telegramalert="off"
telegramtoken="accesstoken"
telegramchatid=""
## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update
updateonstart="off"
## 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 ####
## SteamCMD Settings
# Server appid
appid="817300"
## LinuxGSM Server Details
# Do not edit
gamename="Base Defense"
engine="goldsource"
#### Directories ####
# Edit with care
## Server Specific Directories
systemdir="${serverfiles}/bdef"
executabledir="${serverfiles}"
executable="./hlds_run"
servercfg="${servicename}.cfg"
servercfgdefault="server.cfg"
servercfgdir="${systemdir}"
servercfgfullpath="${servercfgdir}/${servercfg}"
## Backup Directory
backupdir="${rootdir}/backups"
## Logging Directories
logdir="${rootdir}/log"
gamelogdir="${systemdir}/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/bmdmserver/_default.cfg

@ -18,7 +18,7 @@ maxplayers="16"
## Optional: Game Server Login Token
# GSLT can be used for running a public server.
# More info: https://gameservermanagers.com/gslt
# More info: https://linuxgsm.com/gslt
gslt=""
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters

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

@ -10,7 +10,7 @@
## Optional: Game Server Login Token
# GSLT can be used for running a public server.
# More info: https://gameservermanagers.com/gslt
# More info: https://linuxgsm.com/gslt
gslt=""
ip=""

120
lgsm/config-default/config-lgsm/bt1944server/_default.cfg

@ -0,0 +1,120 @@
##################################
######## 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
ip="0.0.0.0"
port="7777"
queryport="7780"
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
fn_parms(){
parms="/Game/Maps/Final_Maps/Derailed?Game=/Script/ShooterGame.BombGameMode?listen -log -broadcastip=\"${ip}\" -PORT=${port} -QueryPort=${queryport} -defgameini=\"${servercfgfullpath}\""
}
#### 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
telegramalert="off"
telegramtoken="accesstoken"
telegramchatid=""
## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update
updateonstart="off"
## 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 ####
## SteamCMD Settings
# Server appid
appid="805140"
# 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="Battalion 1944"
engine="unreal4"
#### Directories ####
# Edit with care
## Server Specific Directories
systemdir="${serverfiles}/Linux/Battalion"
executabledir="${systemdir}/Binaries/Linux"
executable="./BattalionServer"
servercfgdir="${systemdir}/Saved/Config/LinuxServer"
servercfg="${servicename}.ini"
servercfgdefault="DefaultGame.ini"
servercfgfullpath="${servercfgdir}/${servercfg}"
## Backup Directory
backupdir="${lgsmdir}/backup"
## Logging Directories
logdir="${rootdir}/log"
gamelogdir="${systemdir}/Saved/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/csgoserver/_default.cfg

@ -30,7 +30,7 @@ tickrate="64"
## Required: Game Server Login Token
# GSLT is required for running a public server.
# More info: https://gameservermanagers.com/gslt
# More info: https://linuxgsm.com/gslt
gslt=""
## Optional: Workshop Parameters

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

@ -18,7 +18,7 @@ maxplayers="16"
## Required: Game Server Login Token
# GSLT is required for running a public server.
# More info: https://gameservermanagers.com/gslt
# More info: https://linuxgsm.com/gslt
gslt=""
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters

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

@ -18,7 +18,7 @@ maxplayers="62"
## Optional: Game Server Login Token
# GSLT can be used for running a public server.
# More info: https://gameservermanagers.com/gslt
# More info: https://linuxgsm.com/gslt
gslt=""
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters

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

@ -29,7 +29,7 @@ customparms="+r_hunkalloclightmaps 0 -disableluarefresh"
## Optional: Game Server Login Token
# GSLT can be used for running a public server.
# More info: https://gameservermanagers.com/gslt
# More info: https://linuxgsm.com/gslt
gslt=""
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters

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

@ -20,7 +20,7 @@ workshop="0"
## Optional: Game Server Login Token
# GSLT can be used for running a public server.
# More info: https://gameservermanagers.com/gslt
# More info: https://linuxgsm.com/gslt
gslt=""
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters

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

@ -18,7 +18,7 @@ maxplayers="8"
## Optional: Game Server Login Token
# GSLT can be used for running a public server.
# More info: https://gameservermanagers.com/gslt
# More info: https://linuxgsm.com/gslt
gslt=""
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters

12
lgsm/config-default/config-lgsm/rustserver/_default.cfg

@ -19,7 +19,8 @@ servername="Rust"
maxplayers="50"
# Advanced Start Settings
seed="" # default random; range : 1 to 2147483647 ; used to change or reproduce a procedural map
seed="" # default random; range : 1 to 2147483647 ; used to change or reproduce a procedural map
salt="" # default random; range : unknown range ; used to recover a known setting from an existing map
worldsize="3000" # default 3000; range : 1000 to 6000 ; map size in meters
saveinterval="300" # Auto-save in seconds
tickrate="30" # default 30; range : 15 to 100
@ -34,7 +35,14 @@ else
# Keep randomness of the number if not set
conditionalseed=""
fi
parms="-batchmode +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${servicename}\" ${conditionalseed} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile \"${gamelogdate}\""
if [ -n "${salt}" ]; then
# If set, then add to start parms
conditionalsalt="+server.salt ${salt}"
else
# Keep randomness of the number if not set
conditionalsalt=""
fi
parms="-batchmode +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${servicename}\" ${conditionalseed} ${conditionalsalt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile \"${gamelogdate}\""
}
#### LinuxGSM Settings ####

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

@ -18,7 +18,7 @@ maxplayers="16"
## Optional: Game Server Login Token
# GSLT can be used for running a public server.
# More info: https://gameservermanagers.com/gslt
# More info: https://linuxgsm.com/gslt
gslt=""
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters

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

@ -15,7 +15,7 @@ queryport="27015"
## Optional: Game Server Login Token
# GSLT can be used for running a public server.
# More info: https://gameservermanagers.com/gslt
# More info: https://linuxgsm.com/gslt
gslt=""
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters

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

@ -18,7 +18,7 @@ maxplayers="20"
## Optional: Game Server Login Token
# GSLT can be used for running a public server.
# More info: https://gameservermanagers.com/gslt
# More info: https://linuxgsm.com/gslt
gslt=""
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters

2
lgsm/data/serverlist.csv

@ -3,9 +3,11 @@ sdtd,sdtdserver,7 Days to Die
ark,arkserver,ARK: Survival Evolved
bo,boserver,Ballistic Overkill
bf1942,bf1942server,Battlefield 1942
bd,bdserver,Base Defense
bmdm,bmdmserver,Black Mesa: Deathmatch
bs,bsserver,Blade Symphony
bb2,bb2server,BrainBread 2
bt1944,bt1944server,Battalion 1944
cod,codserver,Call of Duty
cod2,cod2server,Call of Duty 2
cod4,cod4server,Call of Duty 4

1 arma3 arma3server ARMA 3
3 ark arkserver ARK: Survival Evolved
4 bo boserver Ballistic Overkill
5 bf1942 bf1942server Battlefield 1942
6 bd bdserver Base Defense
7 bmdm bmdmserver Black Mesa: Deathmatch
8 bs bsserver Blade Symphony
9 bb2 bb2server BrainBread 2
10 bt1944 bt1944server Battalion 1944
11 cod codserver Call of Duty
12 cod2 cod2server Call of Duty 2
13 cod4 cod4server Call of Duty 4

2
lgsm/functions/alert.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM alert.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Overall function for managing alerts.
local commandname="ALERT"

2
lgsm/functions/alert_discord.sh

@ -2,7 +2,7 @@
# LinuxGSM alert_discord.sh function
# Author: Daniel Gibbs
# Contributor: faflfama
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Sends Discord alert.
json=$(cat <<EOF

2
lgsm/functions/alert_email.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM alert_email.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Sends email alert.
local commandname="ALERT"

2
lgsm/functions/alert_ifttt.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM alert_ifttt.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Sends IFTTT alert.
local commandname="ALERT"

2
lgsm/functions/alert_mailgun.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM alert_mailgun.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Sends Mailgun Email alert.
local commandname="ALERT"

2
lgsm/functions/alert_pushbullet.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM alert_pushbullet.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Sends Pushbullet Messenger alert.
local commandname="ALERT"

2
lgsm/functions/alert_pushover.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM alert_pushover.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Sends Pushover alert.
local commandname="ALERT"

2
lgsm/functions/check.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM check.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Overall function for managing checks.
# Runs checks that will either halt on or fix an issue.

2
lgsm/functions/check_config.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM check_config.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Checks if the server config is missing and warns the user if needed.
local commandname="CHECK"

6
lgsm/functions/check_deps.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM check_deps.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Checks if required dependencies are installed for LinuxGSM.
local commandname="CHECK"
@ -149,7 +149,7 @@ if [ -n "$(command -v dpkg-query 2>/dev/null)" ]; then
# All servers except ts3 require tmux
if [ "${gamename}" != "TeamSpeak 3" ]; then
if [ "$(command -v tmux 2>/dev/null)" ]||[ "$(which tmux 2>/dev/null)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
if [ "$(command -v tmux 2>/dev/null)" ]; then
tmuxcheck=1 # Added for users compiling tmux from source to bypass check.
else
array_deps_required+=( tmux )
@ -246,7 +246,7 @@ elif [ -n "$(command -v yum 2>/dev/null)" ]; then
# All servers except ts3 require tmux
if [ "${gamename}" != "TeamSpeak 3" ]; then
if [ "$(command -v tmux 2>/dev/null)" ]||[ "$(which tmux 2>/dev/null)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
if [ "$(command -v tmux 2>/dev/null)" ]; then
tmuxcheck=1 # Added for users compiling tmux from source to bypass check.
else
array_deps_required+=( tmux )

2
lgsm/functions/check_executable.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM check_executable.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Checks if executable exists.
local commandname="CHECK"

4
lgsm/functions/check_glibc.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM check_glibc.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Checks if the server has the correct Glibc version or a fix available.
local commandname="CHECK"
@ -17,7 +17,7 @@ elif [ "${glibcrequired}" == "UNKNOWN" ]; then
fn_print_error_nl "Glibc fix: ${red}${glibcrequired}${default}"
echo -e " * glibc required: ${red}${glibcrequired}${default}"
echo -e " * glibc installed: ${glibcversion}"
elif [ "$(printf '%s\n'${glibcrequired}'\n' ${glibcversion} | sort -V | head -n 1)" != "${glibcrequired}" ]; then
elif [ "$(printf "%s\n'${glibcrequired}'\n" "${glibcversion}" | sort -V | head -n 1)" != "${glibcrequired}" ]; then
if [ "${glibcfix}" == "yes" ]; then
if [ "${function_selfname}" != "command_install.sh" ]; then
fn_print_dots "Glibc fix"

13
lgsm/functions/check_ip.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM check_ip.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Automatically identifies the server interface IP.
# If multiple interfaces are detected the user will need to manually set using ip="0.0.0.0".
@ -50,9 +50,9 @@ if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${gamename}" != "Mumble" ]&&[ "${travi
fi
echo -en "${getip}\n"
echo -en "\n"
echo -en "https://gameservermanagers.com/network-interfaces\n"
echo -en "https://linuxgsm.com/network-interfaces\n"
echo -en ""
fn_script_log_fatal "https://gameservermanagers.com/network-interfaces\n"
fn_script_log_fatal "https://linuxgsm.com/network-interfaces\n"
core_exit.sh
# Single interface
elif [ "${ipsetinconfig}" == "1" ]; then
@ -65,13 +65,16 @@ if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${gamename}" != "Mumble" ]&&[ "${travi
echo -en "Set ${ipinconfigvar} to the following:\n"
echo -en "${getip}\n"
echo -en "\n"
echo -en "https://gameservermanagers.com/network-interfaces\n"
echo -en "https://linuxgsm.com/network-interfaces\n"
echo -en ""
fn_script_log_fatal "IP address not set in game config."
fn_script_log_fatal "Specify the IP you want to bind within: ${servercfgfullpath}."
fn_script_log_fatal "https://gameservermanagers.com/network-interfaces\n"
fn_script_log_fatal "https://linuxgsm.com/network-interfaces\n"
core_exit.sh
else
fn_print_info_nl "Check IP: ${getip}"
fn_script_log_info "IP automatically set as: ${getip}"
sleep 1
ip="${getip}"
fi
fi

2
lgsm/functions/check_logs.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM check_logs.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Checks if log files exist.
local commandname="CHECK"

2
lgsm/functions/check_permissions.sh

@ -2,7 +2,7 @@
# LinuxGSM check_permissions.sh
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Checks ownership & permissions of scripts, files and directories.
local commandname="CHECK"

4
lgsm/functions/check_root.sh

@ -1,13 +1,13 @@
#!/bin/bash
# LinuxGSM check_root.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Checks if the user tried to run the script as root.
local commandname="CHECK"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ $(whoami) = "root" ]; then
if [ "$(whoami)" = "root" ]; then
fn_print_fail_nl "Do NOT run this script as root!"
if [ -d "${lgsmlogdir}" ]; then
fn_script_log_fatal "${selfname} attempted to run as root."

2
lgsm/functions/check_status.sh

@ -2,7 +2,7 @@
# LinuxGSM check_status.sh function
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Checks the process status of the server. Either online or offline.
local commandname="CHECK"

2
lgsm/functions/check_steamcmd.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM check_steamcmd.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Checks if SteamCMD is installed correctly.
local commandname="CHECK"

2
lgsm/functions/check_system_dir.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM check_system_dir.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Checks if systemdir/serverfiles is accessible.
local commandname="CHECK"

2
lgsm/functions/check_system_requirements.sh

@ -2,7 +2,7 @@
# LinuxGSM check_system_requirements.sh
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Checks RAM requirements
local commandname="CHECK"

2
lgsm/functions/check_tmuxception.sh

@ -2,7 +2,7 @@
# LinuxGSM check_config.sh function
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Checks if run from tmux or screen
local commandname="check"

2
lgsm/functions/command_backup.sh

@ -2,7 +2,7 @@
# LinuxGSM command_backup.sh function
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Creates a .tar.gz file in the backup directory.
local commandname="BACKUP"

2
lgsm/functions/command_console.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM command_console.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Gives access to the server tmux console.
local commandname="CONSOLE"

2
lgsm/functions/command_debug.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM command_debug.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Runs the server without tmux and directly from the terminal.
local commandname="DEBUG"

2
lgsm/functions/command_details.sh

@ -2,7 +2,7 @@
# LinuxGSM command_details.sh function
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Displays server information.
local commandname="DETAILS"

2
lgsm/functions/command_dev_debug.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM command_dev_debug.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Dev only: Enables debugging log to be saved to dev-debug.log.
local commandname="DEV-DEBUG"

6
lgsm/functions/command_dev_detect_deps.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM command_dev_detect_deps.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Detects dependencies the server binary requires.
local commandname="DEPS-DETECT"
@ -20,7 +20,7 @@ elif [ "$(command -v readelf 2>/dev/null)" ]; then
else
echo "readelf/eu-readelf not installed"
fi
files=$(find ${serverfiles} | wc -l)
files=$(find "${serverfiles}" | wc -l)
find "${serverfiles}" -type f -print0 |
while IFS= read -r -d $'\0' line; do
if [ "${readelf}" == "eu-readelf" ]; then
@ -34,7 +34,7 @@ done
sort "${tmpdir}/.depdetect_readelf" |uniq >"${tmpdir}/.depdetect_readelf_uniq"
while read lib; do
while read -r lib; do
if [ "${lib}" == "libm.so.6" ]||[ "${lib}" == "libc.so.6" ]||[ "${lib}" == "libtcmalloc_minimal.so.4" ]||[ "${lib}" == "libpthread.so.0" ]||[ "${lib}" == "libdl.so.2" ]||[ "${lib}" == "libnsl.so.1" ]||[ "${lib}" == "libgcc_s.so.1" ]||[ "${lib}" == "librt.so.1" ]||[ "${lib}" == "ld-linux.so.2" ]; then
echo "glibc.i686" >> "${tmpdir}/.depdetect_centos_list"
echo "lib32gcc1" >> "${tmpdir}/.depdetect_ubuntu_list"

6
lgsm/functions/command_dev_detect_glibc.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM command_dev_detect_glibc.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Automatically detects the version of GLIBC that is required.
# Can check a file or directory recursively.
@ -28,8 +28,8 @@ elif [ -f "${serverfiles}" ]; then
fi
echo ""
files=$(find ${serverfiles} | wc -l)
find ${serverfiles} -type f -print0 |
files=$(find "${serverfiles}" | wc -l)
find "${serverfiles}" -type f -print0 |
while IFS= read -r -d $'\0' line; do
glibcversion=$(objdump -T "${line}" 2>/dev/null|grep -oP "GLIBC[^ ]+" |grep -v GLIBCXX|sort|uniq|sort -r --version-sort| head -n 1)
if [ "${glibcversion}" ]; then

6
lgsm/functions/command_dev_detect_ldd.sh

@ -1,7 +1,7 @@
#!/bin/bash
# command_dev_detect_ldd.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Automatically detects required deps using ldd.
# Can check a file or directory recursively.
@ -26,11 +26,11 @@ files=$(find "${serverfiles}" | wc -l)
find "${serverfiles}" -type f -print0 |
while IFS= read -r -d $'\0' line; do
#ldd -v $line 2>/dev/null|grep "=>" >>"${tmpdir}/detect_ldd.tmp"
if [ -n "$(ldd ${line} 2>/dev/null |grep -v "not a dynamic executable")" ]; then
if [ -n "$(ldd "${line}" 2>/dev/null |grep -v "not a dynamic executable")" ]; then
echo "${line}" >> "${tmpdir}/detect_ldd.tmp"
ldd "${line}" 2>/dev/null |grep -v "not a dynamic executable" >> "${tmpdir}/detect_ldd.tmp"
if [ -n "$(ldd $line 2>/dev/null |grep -v "not a dynamic executable"|grep "not found")" ]; then
if [ -n "$(ldd "${line}" 2>/dev/null |grep -v "not a dynamic executable"|grep "not found")" ]; then
echo "${line}" >> "${tmpdir}/detect_ldd_not_found.tmp"
ldd "${line}" 2>/dev/null |grep -v "not a dynamic executable"|grep "not found" >> "${tmpdir}/detect_ldd_not_found.tmp"
fi

12
lgsm/functions/command_fastdl.sh

@ -2,7 +2,7 @@
# LinuxGSM command_fastdl.sh function
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Creates a FastDL directory.
local commandname="FASTDL"
@ -69,7 +69,7 @@ fn_clear_old_fastdl(){
echo -en "clearing existing FastDL directory ${fastdldir}..."
rm -R "${fastdldir:?}"
exitcode=$?
if [ "${exitcode}" -ne 0 ]; then
if [ ${exitcode} -ne 0 ]; then
fn_print_fail_eol_nl
fn_script_log_fatal "Clearing existing FastDL directory ${fastdldir}"
core_exit.sh
@ -337,7 +337,7 @@ fn_fastdl_source(){
fi
cp "${fastdlfile}" "${fastdldir}/${directory}"
exitcode=$?
if [ "${exitcode}" -ne 0 ]; then
if [ ${exitcode} -ne 0 ]; then
fn_print_fail_eol_nl
fn_script_log_fatal "Copying ${fastdlfile} > ${fastdldir}/${directory}"
core_exit.sh
@ -373,7 +373,7 @@ fn_fastdl_gmod_dl_enforcer(){
echo -en "removing existing download enforcer: ${luafastdlfile}..."
rm "${luafastdlfullpath:?}"
exitcode=$?
if [ "${exitcode}" -ne 0 ]; then
if [ ${exitcode} -ne 0 ]; then
fn_print_fail_eol_nl
fn_script_log_fatal "Removing existing download enforcer ${luafastdlfullpath}"
core_exit.sh
@ -391,7 +391,7 @@ fn_fastdl_gmod_dl_enforcer(){
echo "resource.AddFile( \"${line}\" )" >> "${luafastdlfullpath}"
done < <(find "${fastdldir:?}" \( -type f ! -name "*.bz2" \) -printf '%P\n')
exitcode=$?
if [ "${exitcode}" -ne 0 ]; then
if [ ${exitcode} -ne 0 ]; then
fn_print_fail_eol_nl
fn_script_log_fatal "Creating new download enforcer ${luafastdlfullpath}"
core_exit.sh
@ -408,7 +408,7 @@ fn_fastdl_bzip2(){
echo -en "\r\033[Kcompressing ${filetocompress}..."
bzip2 -f "${filetocompress}"
exitcode=$?
if [ "${exitcode}" -ne 0 ]; then
if [ ${exitcode} -ne 0 ]; then
fn_print_fail_eol_nl
fn_script_log_fatal "Compressing ${filetocompress}"
core_exit.sh

2
lgsm/functions/command_install.sh

@ -2,7 +2,7 @@
# LinuxGSM command_install.sh function
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Overall function for the installer.
local commandname="INSTALL"

2
lgsm/functions/command_install_resources_mta.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM command_install_resources_mta.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Installs the default resources for Multi Theft Auto.
local commandname="DEFAULT_RESOURCES"

2
lgsm/functions/command_mods_install.sh

@ -2,7 +2,7 @@
# LinuxGSM command_mods_install.sh function
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: List and installs available mods along with mods_list.sh and mods_core.sh.
local commandname="MODS"

6
lgsm/functions/command_mods_remove.sh

@ -2,7 +2,7 @@
# LinuxGSM command_mods_uninstall.sh function
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Uninstall mods along with mods_list.sh and mods_core.sh.
local commandname="MODS"
@ -68,7 +68,7 @@ while [ "${modfileline}" -le "${modsfilelistsize}" ]; do
# If file or directory exists, then remove it
if [ -f "${modinstalldir}/${currentfileremove}" ]||[ -d "${modinstalldir}/${currentfileremove}" ]; then
rm -rf "${modinstalldir}/${currentfileremove}"
rm -rf "${modinstalldir:?}/${currentfileremove}"
((exitcode=$?))
if [ ${exitcode} -ne 0 ]; then
fn_script_log_fatal "Removing ${modinstalldir}/${currentfileremove}"
@ -78,7 +78,7 @@ while [ "${modfileline}" -le "${modsfilelistsize}" ]; do
fi
fi
tput rc; tput el
printf "removing ${modprettyname} ${modfileline} / ${modsfilelistsize} : ${currentfileremove}..."
echo "removing ${modprettyname} ${modfileline} / ${modsfilelistsize} : ${currentfileremove}..."
((modfileline++))
done
if [ ${exitcode} -ne 0 ]; then

6
lgsm/functions/command_mods_update.sh

@ -2,7 +2,7 @@
# LinuxGSM command_mods_update.sh function
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Updates installed mods along with mods_list.sh and mods_core.sh.
local commandname="MODS"
@ -27,7 +27,7 @@ fn_remove_cfg_files(){
echo -e " * serverfiles/${filetopreserve}"
# If it matches an existing file that have been extracted delete the file
if [ -f "${extractdir}/${filetopreserve}" ]||[ -d "${extractdir}/${filetopreserve}" ]; then
rm -r "${extractdir}/${filetopreserve}"
rm -r "${extractdir:?}/${filetopreserve}"
# Write the file path in a tmp file, to rebuild a full file list as it is rebuilt upon update
if [ ! -f "${modsdir}/.removedfiles.tmp" ]; then
touch "${modsdir}/.removedfiles.tmp"
@ -72,7 +72,7 @@ sleep 1
# List all installed mods and apply update
# Reset line value
installedmodsline="1"
while [ ${installedmodsline} -le ${installedmodscount} ]; do
while [ "${installedmodsline}" -le "${installedmodscount}" ]; do
currentmod="$(sed "${installedmodsline}q;d" "${modsinstalledlistfullpath}")"
if [ -n "${currentmod}" ]; then
fn_mod_get_info

4
lgsm/functions/command_monitor.sh

@ -2,7 +2,7 @@
# LinuxGSM command_monitor.sh function
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Monitors server by checking for running processes.
# then passes to monitor_gsquery.sh.
@ -79,7 +79,7 @@ fn_monitor_tmux(){
fn_print_ok_eol_nl
fn_script_log_pass "Checking session: OK"
# runs gsquery check on game with specific engines.
local allowed_engines_array=( avalanche2.0 avalanche3.0 goldsource idtech2 idtech3 idtech3_ql iw2.0 iw3.0 madness quake refractor realvirtuality source spark starbound unity3d unreal unreal2 )
local allowed_engines_array=( avalanche2.0 avalanche3.0 goldsource idtech2 idtech3 idtech3_ql iw2.0 iw3.0 madness quake refractor realvirtuality source spark starbound unity3d unreal unreal2 unreal4 )
for allowed_engine in "${allowed_engines_array[@]}"
do
if [ "${allowed_engine}" == "starbound" ]; then

2
lgsm/functions/command_postdetails.sh

@ -2,7 +2,7 @@
# LinuxGSM command_postdetails.sh function
# Author: CedarLUG
# Contributor: CedarLUG
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Strips sensitive information out of Details output
local commandname="postdetails"

2
lgsm/functions/command_restart.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM command_restart.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Restarts the server.
local commandname="RESTART"

16
lgsm/functions/command_start.sh

@ -2,7 +2,7 @@
# LinuxGSM command_start.sh function
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Starts the server.
local commandname="START"
@ -126,13 +126,13 @@ fn_start_tmux(){
# tmux pipe-pane not supported in tmux versions < 1.6
if [ "${tmuxversion}" -lt "16" ]; then
echo "Console logging disabled: Tmux => 1.6 required
https://gameservermanagers.com/tmux-upgrade
https://linuxgsm.com/tmux-upgrade
Currently installed: $(tmux -V)" > "${consolelog}"
# Console logging disabled: Bug in tmux 1.8 breaks logging
elif [ "${tmuxversion}" -eq "18" ]; then
echo "Console logging disabled: Bug in tmux 1.8 breaks logging
https://gameservermanagers.com/tmux-upgrade
https://linuxgsm.com/tmux-upgrade
Currently installed: $(tmux -V)" > "${consolelog}"
# Console logging enable or not set
elif [ "${consolelogging}" == "on" ]||[ -z "${consolelogging}" ]; then
@ -168,7 +168,7 @@ sleep 1
echo "================================="
cat "${lgsmlogdir}/.${servicename}-tmux-error.tmp" | tee -a "${lgsmlog}"
# Detected error https://gameservermanagers.com/support
# Detected error https://linuxgsm.com/support
if [ $(grep -c "Operation not permitted" "${lgsmlogdir}/.${servicename}-tmux-error.tmp") ]; then
echo ""
echo "Fix"
@ -185,13 +185,13 @@ sleep 1
echo ""
echo " usermod -G tty $(whoami)"
echo ""
echo "https://gameservermanagers.com/tmux-op-perm"
fn_script_log_info "https://gameservermanagers.com/tmux-op-perm"
echo "https://linuxgsm.com/tmux-op-perm"
fn_script_log_info "https://linuxgsm.com/tmux-op-perm"
else
echo "No known fix currently. Please log an issue."
fn_script_log_info "No known fix currently. Please log an issue."
echo "https://gameservermanagers.com/support"
fn_script_log_info "https://gameservermanagers.com/support"
echo "https://linuxgsm.com/support"
fn_script_log_info "https://linuxgsm.com/support"
fi
fi
fi

8
lgsm/functions/command_stop.sh

@ -2,7 +2,7 @@
# LinuxGSM command_stop.sh function
# Author: Daniel Gibbs
# Contributors: UltimateByte
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Stops the server.
local commandname="STOP"
@ -118,7 +118,7 @@ fn_stop_graceful_sdtd(){
sleep 1
if [ "${telnetenabled}" == "false" ]; then
fn_print_info_nl "Graceful: telnet: DISABLED: Enable in ${servercfg}"
elif [ "$(command -v expect 2>/dev/null)" ]||[ "$(which expect >/dev/null 2>&1)" ]; then
elif [ "$(command -v expect 2>/dev/null)" ]; then
# Tries to shutdown with both localhost and server IP.
for telnetip in 127.0.0.1 ${ip}; do
fn_print_dots "Graceful: telnet: ${telnetip}"
@ -219,14 +219,14 @@ fn_stop_ark(){
if [ "${#queryport}" -gt 0 ] ; then
for (( pidcheck=0 ; pidcheck < ${maxpiditer} ; pidcheck++ )) ; do
pid=$(netstat -nap 2>/dev/null | grep ^udp[[:space:]] |\
grep :${queryport}[[:space:]] | rev | awk '{print $1}' |\
grep ":${queryport}[[:space:]]" | rev | awk '{print $1}' |\
rev | cut -d\/ -f1)
#
# check for a valid pid
pid=${pid//[!0-9]/}
let pid+=0 # turns an empty string into a valid number, '0',
# and a valid numeric pid remains unchanged.
if [ "${pid}" -gt 1 ]&&[ "${pid}" -le $(cat /proc/sys/kernel/pid_max) ]; then
if [ "${pid}" -gt 1 ]&&[ "${pid}" -le "$(cat "/proc/sys/kernel/pid_max")" ]; then
fn_print_dots "Process still bound. Awaiting graceful exit: ${pidcheck}"
sleep 1
else

2
lgsm/functions/command_test_alert.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM command_test_alert.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Sends a test alert.
local commandname="ALERT"

4
lgsm/functions/command_ts3_server_pass.sh

@ -2,7 +2,7 @@
# LinuxGSM command_ts3_server_pass.sh function
# Author: Daniel Gibbs
# Contributor : UltimateByte
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Changes TS3 serveradmin password.
local commandname="TS3-CHANGE-PASS"
@ -19,7 +19,7 @@ fn_serveradmin_password_prompt(){
echo Exiting; exit
fi
fn_script_log_info "Initiating ${gamename} ServerAdmin password change"
read -p "Enter new password : " newpassword
read -rp "Enter new password : " newpassword
}
fn_serveradmin_password_set(){

2
lgsm/functions/command_update.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM command_update.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Handles updating of servers.
local commandname="UPDATE"

2
lgsm/functions/command_update_functions.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM command_update_functions.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Deletes the functions dir to allow re-downloading of functions from GitHub.
# Legacy Command

2
lgsm/functions/command_update_linuxgsm.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM command_update_linuxgsm.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Deletes the functions dir to allow re-downloading of functions from GitHub.
local commandname="UPDATE LinuxGSM"

4
lgsm/functions/command_validate.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM command_validate.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Runs a server validation.
local commandname="VALIDATE"
@ -22,7 +22,7 @@ fn_validation(){
cd "${steamcmddir}"
# Detects if unbuffer command is available for 32 bit distributions only.
info_distro.sh
if [ $(command -v stdbuf) ]&&[ "${arch}" != "x86_64" ]; then
if [ "$(command -v stdbuf)" ]&&[ "${arch}" != "x86_64" ]; then
unbuffer="stdbuf -i0 -o0 -e0"
fi

2
lgsm/functions/command_wipe.sh

@ -2,7 +2,7 @@
# LinuxGSM command_backup.sh function
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Wipes server data, useful after updates for some games like Rust
local commandname="WIPE"

4
lgsm/functions/compress_unreal2_maps.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM compress_unreal2_maps.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Compresses unreal maps.
local commandaction="Unreal Map Compressor"
@ -22,7 +22,7 @@ if ! fn_prompt_yn "Start compression?" Y; then
fi
mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1
rm -rfv "${serverfiles}/Maps/"*.ut2.uz2
cd "${systemdir}"
cd "${systemdir}" || exit
for map in "${serverfiles}/Maps/"*; do
./ucc-bin compress "${map}" --nohomedir
done

2
lgsm/functions/compress_ut99_maps.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM compress_ut99_maps.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Compresses unreal maps.
local commandaction="Unreal Map Compressor"

14
lgsm/functions/core_dl.sh

@ -2,7 +2,7 @@
# LinuxGSM core_dl.sh function
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Deals with all downloads for LinuxGSM.
# remote_fileurl: The URL of the file: http://example.com/dl/File.tar.bz2
@ -116,8 +116,8 @@ fn_fetch_file(){
if [ "${local_filename##*.}" == "bz2" ]||[ "${local_filename##*.}" == "gz" ]||[ "${local_filename##*.}" == "zip" ]||[ "${local_filename##*.}" == "jar" ]; then
echo -ne "downloading ${local_filename}..."
sleep 0.5
curlcmd=$(${curlpath} --progress-bar --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}")
echo -ne "downloading ${local_filename}..."
curlcmd=$(${curlpath} --progress-bar --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}")
else
echo -ne " fetching ${local_filename}...\c"
curlcmd=$(${curlpath} -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1)
@ -238,15 +238,9 @@ fn_update_function(){
}
# Defines curl path
curl_paths_array=($(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)
for curlpath in "${curl_paths_array}"
do
if [ -x "${curlpath}" ]; then
break
fi
done
curlpath=$(command -v curl 2>/dev/null)
if [ "$(basename ${curlpath})" != "curl" ]; then
if [ "$(basename "${curlpath}")" != "curl" ]; then
echo "[ FAIL ] Curl is not installed"
exit 1
fi

6
lgsm/functions/core_exit.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM core_exit.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Handles exiting of LinuxGSM by running and reporting an exit code.
fn_exit_dev_debug(){
@ -26,12 +26,12 @@ elif [ -n "${exitcode}" ]&&[ "${exitcode}" != "0" ]; then
fn_exit_dev_debug
# remove trap.
trap - INT
exit ${exitcode}
exit "${exitcode}"
else
exitcode=0
fn_script_log_pass "${function_selfname} exiting with code: ${exitcode}"
fn_exit_dev_debug
# remove trap.
trap - INT
exit ${exitcode}
exit "${exitcode}"
fi

2
lgsm/functions/core_functions.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM core_functions.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Defines all functions to allow download and execution of functions using fn_fetch_function.
# This function is called first before any other function. Without this file other functions will not load.

4
lgsm/functions/core_getopt.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM core_getopt.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: getopt arguments.
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
@ -148,7 +148,7 @@ fn_opt_usage(){
echo "Usage: $0 [option]"
echo -e ""
echo "${gamename} - Linux Game Server Manager - Version ${version}"
echo "https://gameservermanagers.com/${gameservername}"
echo "https://linuxgsm.com/${gameservername}"
echo -e ""
echo -e "${lightyellow}Commands${default}"
# Display available commands

2
lgsm/functions/core_legacy.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM core_legacy.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Code for backwards compatability with older versions of LinuxGSM.
if [ -z "${serverfiles}" ]; then

2
lgsm/functions/core_messages.sh

@ -2,7 +2,7 @@
# LinuxGSM core_messages.sh function
# Author: Daniel Gibbs
# Contributor: s-eam
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Defines on-screen messages such as [ OK ] and how script logs look.
# nl: new line: message is following by a new line

2
lgsm/functions/core_trap.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM core_trap.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Handles CTRL-C trap to give an exit code.
fn_exit_trap(){

2
lgsm/functions/fix.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM fix.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Overall function for managing fixes.
# Runs functions that will fix an issue.

2
lgsm/functions/fix_ark.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM fix_ark.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Resolves various issues with ARK: Survival Evolved.
# Symlinking the SteamCMD directory into the correct ARK directory so that the mods auto-management will work.

2
lgsm/functions/fix_arma3.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM fix_arma3.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Resolves an issue with ARMA3.
local commandname="FIX"

2
lgsm/functions/fix_coduo.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM fix_coduo.sh function
# Author: Alexander Hurd
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Fixes for Call of Duty: United Offensive
local commandname="FIX"

2
lgsm/functions/fix_csgo.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM fix_csgo.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Resolves various issues with CS:GO.
local commandname="FIX"

2
lgsm/functions/fix_dst.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM fix_dst.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Resolves various issues with Don't Starve Together.
local commandname="FIX"

2
lgsm/functions/fix_ges.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM fix_ges.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Resolves various issues with GoldenEye: Source.
local commandname="FIX"

2
lgsm/functions/fix_glibc.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM fix_glibc.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Downloads required Glibc files and applies the Glibc fix if required.
local commandname="FIX"

2
lgsm/functions/fix_ins.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM fix_ins.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Resolves various issues with Insurgency.
local commandname="FIX"

2
lgsm/functions/fix_kf.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM fix_kf.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Resolves various issues with Killing Floor.
local commandname="FIX"

2
lgsm/functions/fix_kf2.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM fix_kf3.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Resolves various issues with Killing Floor 2.
local commandname="FIX"

2
lgsm/functions/fix_mta.sh

@ -2,7 +2,7 @@
# LinuxGSM fix_mta.sh function
# Author: Daniel Gibbs
# Contributor: ChaosMTA
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Installs the libmysqlclient for database functions on the server
local commandname="FIX"
local commandaction="Fix"

2
lgsm/functions/fix_ro.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM fix_ro.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Resolves various issues with Red Orchestra.
local commandname="FIX"

2
lgsm/functions/fix_rust.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM fix_rust.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Resolves startup issue with Rust
local commandname="FIX"

2
lgsm/functions/fix_steamcmd.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM fix_steamcmd.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Resolves various issues related to SteamCMD.
local commandname="FIX"

2
lgsm/functions/fix_ut.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM fix_ut.sh function
# Author: Alexander Hurd
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Resolves various issues with Unreal Tournament.
local commandname="FIX"

2
lgsm/functions/fix_ut2k4.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM fix_ut2k4.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Resolves various issues with Unreal Tournament 2004.
local commandname="FIX"

4
lgsm/functions/gsquery.py

@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# PythonGSQ
# Author: Anonymous & Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Allows querying of various game servers.
import optparse
@ -17,7 +17,7 @@ class PythonGSQ:
self.server_response_timeout = 5
self.default_buffer_length = 1024
#
sourcequery=[ 'avalanche3.0','madness','quakelive','realvirtuality','refractor','source','goldsource','spark','starbound','unity3d']
sourcequery=[ 'avalanche3.0','madness','quakelive','realvirtuality','refractor','source','goldsource','spark','starbound','unity3d', 'unreal4' ]
idtech3query=['idtech3','quake','iw3.0']
idtech2query=['idtech2','iw2.0']
if self.option.engine in sourcequery:

19
lgsm/functions/info_config.sh

@ -2,7 +2,7 @@
# LinuxGSM info_config.sh function
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Gets specific details from config files.
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
@ -108,6 +108,20 @@ fn_info_config_ballistic_overkill(){
fi
}
fn_info_config_battalion1944(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
serverpassword="${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]*$//')
serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
# Not Set
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
fi
}
fn_info_config_bf1942(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
@ -916,6 +930,9 @@ if [ "${gamename}" == "ARK: Survivial Evolved" ]; then
# Ballistic Overkill
elif [ "${gamename}" == "Ballistic Overkill" ]; then
fn_info_config_ballistic_overkill
# Battalion 1944
elif [ "${gamename}" == "Battalion 1944" ]; then
fn_info_config_battalion1944
# Battlefield: 1942
elif [ "${gamename}" == "Battlefield: 1942" ]; then
fn_info_config_bf1942

4
lgsm/functions/info_distro.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM info_distro.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Variables providing useful info on the Operating System such as disk and performace info.
# Used for command_details.sh, command_debug.sh and alert.sh.
@ -124,7 +124,7 @@ if [ -d "${backupdir}" ]; then
# number of backups.
backupcount=$(find "${backupdir}"/*.tar.gz | wc -l)
# most recent backup.
lastbackup=$(ls -t "${backupdir}"/*.tar.gz | head -1)
lastbackup=$(find "${backupdir}"/*.tar.gz | head -1)
# date of most recent backup.
lastbackupdate=$(date -r "${lastbackup}")
# no of days since last backup.

8
lgsm/functions/info_glibc.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM info_glibc.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Stores details on servers Glibc requirements.
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
@ -12,6 +12,12 @@ if [ "${gamename}" == "ARK: Survival Evolved" ]; then
elif [ "${gamename}" == "Ballistic Overkill" ]; then
glibcrequired="2.15"
glibcfix="yes"
elif [ "${gamename}" == "Battalion 1944" ]; then
glibcrequired="2.17"
glibcfix="no"
elif [ "${gamename}" == "Base Defense" ]; then
glibcrequired="2.14"
glibcfix="no"
elif [ "${gamename}" == "Black Mesa: Deathmatch" ]; then
glibcrequired="2.15"
glibcfix="yes"

20
lgsm/functions/info_messages.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM info_messages.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Defines server info messages for details, alerts.
# Standard Details
@ -507,6 +507,22 @@ fn_info_message_ballisticoverkill(){
} | column -s $'\t' -t
}
fn_info_message_battalion1944(){
echo -e "netstat -atunp | grep BattalionServ"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "> Game\tINBOUND\t${port}\tudp"
# Don't do arithmetics if ever the port wasn't a numeric value
# unconfirmed - http://wiki.battaliongame.com/Community_Servers#Firewalls_.2F_Port_Forwarding
if [ "${port}" -eq "${port}" ]; then
echo -e "> Steam\tINBOUND\t$((port+1))\tudp"
echo -e "> Unused\tINBOUND\t$((port+2))\ttcp"
fi
echo -e "> Query\tINBOUND\t${queryport}\tudp"
} | column -s $'\t' -t
}
fn_info_message_cod(){
echo -e "netstat -atunp | grep cod_lnxded"
echo -e ""
@ -997,6 +1013,8 @@ fn_info_message_select_engine(){
fn_info_message_ark
elif [ "${gamename}" == "Ballistic Overkill" ]; then
fn_info_message_ballisticoverkill
elif [ "${gamename}" == "Battalion 1944" ]; then
fn_info_message_battalion1944
elif [ "${gamename}" == "Call of Duty" ]; then
fn_info_message_cod
elif [ "${gamename}" == "Call of Duty: United Offensive" ]; then

2
lgsm/functions/info_parms.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM info_parms.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: If specific parms are not set then this will be displayed in details.
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

2
lgsm/functions/install_complete.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM install_complete.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Prints installation completion message and hints.
local commandname="INSTALL"

18
lgsm/functions/install_config.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM install_config.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Creates default server configs.
local commandname="INSTALL"
@ -61,8 +61,7 @@ fn_set_config_vars(){
echo "changing hostname."
fn_script_log_info "changing hostname."
sleep 1
if [ $(grep SERVERNAME=SERVERNAME \"${lgsmdir}/config-default/config-game/${config}\") ]; then
if grep -q "SERVERNAME=SERVERNAME" "${lgsmdir}/config-default/config-game/${config}" 2>/dev/null; then
sed -i "s/SERVERNAME=SERVERNAME/SERVERNAME=${servername}/g" "${servercfgfullpath}"
else
sed -i "s/SERVERNAME/${servername}/g" "${servercfgfullpath}"
@ -154,6 +153,19 @@ elif [ "${gamename}" == "Ballistic Overkill" ]; then
fn_fetch_default_config
fn_default_config_remote
fn_set_config_vars
elif [ "${gamename}" == "Base Defense" ]; then
gamedirname="BaseDefense"
array_configs+=( server.cfg )
fn_fetch_default_config
fn_default_config_remote
fn_set_config_vars
elif [ "${gamename}" == "Battalion 1944" ]; then
gamedirname="Battalion1944"
fn_check_cfgdir
array_configs+=( DefaultGame.ini )
fn_fetch_default_config
fn_default_config_remote
fn_set_config_vars
elif [ "${gamename}" == "Battlefield: 1942" ]; then
gamedirname="Battlefield1942"
array_configs+=( serversettings.con )

6
lgsm/functions/install_dst_token.sh

@ -1,7 +1,7 @@
#!/bin/bash
# LinuxGSM install_dst_token.sh function
# Author: Daniel Gibbs & Marvin Lehmann (marvinl97)
# Website: https://gameservermanagers.com
# Website: https://linuxgsm.com
# Description: Configures Don't Starve Together cluster with given token.
local commandname="INSTALL"
@ -14,7 +14,7 @@ echo "================================="
sleep 1
echo "A cluster token is required to run this server!"
echo "Follow the instructions in this link to obtain this key:"
echo "https://gameservermanagers.com/dst-auth-token"
echo "https://linuxgsm.com/dst-auth-token"
echo ""
if [ -z "${autoinstall}" ]; then
overwritetoken="true"
@ -30,7 +30,7 @@ if [ -z "${autoinstall}" ]; then
if [ "${overwritetoken}" == "true" ]; then
echo "Once you have the cluster token, enter it below"
echo -n "Cluster Token: "
read token
read -r token
mkdir -pv "${clustercfgdir}"
echo "${token}" > "${clustercfgdir}/cluster_token.txt"
if [ -f "${clustercfgdir}/cluster_token.txt" ]; then

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save