Browse Source

Merge pull request #2301 from GameServerManagers/release/190422

Release/190422
pull/2319/head 190422
Daniel Gibbs 6 years ago
committed by GitHub
parent
commit
16dea3074b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 107
      .all-contributorsrc
  2. 8
      .travis.yml
  3. 43
      PULL_REQUEST_TEMPLATE.md
  4. 15
      README.md
  5. 7
      lgsm/config-default/config-lgsm/bsserver/_default.cfg
  6. 135
      lgsm/config-default/config-lgsm/dysserver/_default.cfg
  7. 130
      lgsm/config-default/config-lgsm/ndserver/_default.cfg
  8. 2
      lgsm/data/serverlist.csv
  9. 5
      lgsm/functions/check_executable.sh
  10. 2
      lgsm/functions/command_debug.sh
  11. 16
      lgsm/functions/command_dev_query_raw.sh
  12. 8
      lgsm/functions/command_fastdl.sh
  13. 4
      lgsm/functions/command_install.sh
  14. 3
      lgsm/functions/command_monitor.sh
  15. 6
      lgsm/functions/command_start.sh
  16. 22
      lgsm/functions/core_functions.sh
  17. 2
      lgsm/functions/core_getopt.sh
  18. 45
      lgsm/functions/fix.sh
  19. 4
      lgsm/functions/fix_dst.sh
  20. 2
      lgsm/functions/fix_mta.sh
  21. 5
      lgsm/functions/fix_ss3.sh
  22. 8
      lgsm/functions/fix_steamcmd.sh
  23. 2
      lgsm/functions/fix_tf2.sh
  24. 7
      lgsm/functions/fix_ts3.sh
  25. 8
      lgsm/functions/info_config.sh
  26. 3
      lgsm/functions/info_glibc.sh
  27. 6
      lgsm/functions/info_messages.sh
  28. 3
      lgsm/functions/install_complete.sh
  29. 12
      lgsm/functions/install_config.sh
  30. 45
      lgsm/functions/install_eula.sh
  31. 8
      lgsm/functions/install_gslt.sh
  32. 28
      lgsm/functions/install_minecraft_eula.sh
  33. 6
      lgsm/functions/install_server_files.sh
  34. 55
      lgsm/functions/install_ts3db.sh
  35. 28
      lgsm/functions/install_unreal_tournament_eula.sh
  36. 2
      lgsm/functions/query_gsquery.py
  37. 2
      lgsm/functions/update_factorio.sh
  38. 5
      lgsm/functions/update_minecraft.sh
  39. 6
      linuxgsm.sh
  40. 14
      tests/tests_fctrserver.sh
  41. 14
      tests/tests_jc2server.sh
  42. 1043
      tests/tests_mcserver.sh
  43. 4
      tests/tests_shellcheck.sh
  44. 14
      tests/tests_ts3server.sh

107
.all-contributorsrc

@ -0,0 +1,107 @@
{
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"contributors": [
{
"login": "dgibbs64",
"name": "Daniel Gibbs",
"avatar_url": "https://avatars2.githubusercontent.com/u/4478206?v=4",
"profile": "https://danielgibbs.co.uk",
"contributions": [
"bug",
"code",
"ideas",
"question",
"review",
"content",
"doc",
"infra"
]
},
{
"login": "Frisasky",
"name": "Frisasky",
"avatar_url": "https://avatars2.githubusercontent.com/u/26865851?v=4",
"profile": "https://github.com/Frisasky",
"contributions": [
"question"
]
},
{
"login": "kennyLtv",
"name": "Kenny Lindelof",
"avatar_url": "https://avatars2.githubusercontent.com/u/6133325?v=4",
"profile": "https://kennyl.design",
"contributions": [
"question"
]
},
{
"login": "Scarsz",
"name": "Austin Shapiro",
"avatar_url": "https://avatars1.githubusercontent.com/u/7691988?v=4",
"profile": "https://scarsz.me",
"contributions": [
"bug",
"code"
]
},
{
"login": "marvinlehmann",
"name": "Marvin Lehmann",
"avatar_url": "https://avatars2.githubusercontent.com/u/4151266?v=4",
"profile": "https://github.com/marvinlehmann",
"contributions": [
"bug",
"code"
]
},
{
"login": "Bourne-ID",
"name": "Bourne-ID",
"avatar_url": "https://avatars1.githubusercontent.com/u/7073616?v=4",
"profile": "https://github.com/Bourne-ID",
"contributions": [
"review",
"content",
"doc",
"infra"
"review"
]
},
{
"login": "cedarlug",
"name": "CedarLUG",
"avatar_url": "https://avatars2.githubusercontent.com/u/19336442?v=4",
"profile": "http://cedarlug.org",
"contributions": [
"bug",
"code",
"ideas",
"question",
"review"
]
},
{
"login": "UltimateByte",
"name": "UltimateByte",
"avatar_url": "https://avatars3.githubusercontent.com/u/8805941?v=4",
"profile": "https://www.terageek.org | https://www.haisoft.fr",
"contributions": [
"bug",
"code",
"doc",
"ideas",
"review",
]
}
],
"contributorsPerLine": 7,
"projectName": "LinuxGSM",
"projectOwner": "GameServerManagers",
"repoType": "github",
"repoHost": "https://github.com"
}

8
.travis.yml

@ -1,4 +1,4 @@
language: bash node_js language: node_js
dist: xenial dist: xenial
node_js: node_js:
- 10 - 10
@ -40,6 +40,8 @@ jobs:
- # stage name not required - # stage name not required
script: bash tests/tests_fctrserver.sh script: bash tests/tests_fctrserver.sh
- # stage name not required - # stage name not required
script: bash tests/tests_ts3server.sh script: bash tests/tests_mcserver.sh
- # stage name not required - # stage name not required
script: bash tests/tests_shellcheck.sh script: bash tests/tests_ts3server.sh
- # retired as codacy does this check.
# script: bash tests/tests_shellcheck.sh

43
PULL_REQUEST_TEMPLATE.md

@ -2,22 +2,39 @@
Please include a summary of the change and which issue is fixed. Please include a summary of the change and which issue is fixed.
Fixes #\[issue] Fixes #[issue]
## Type of change ## Type of change
* [ ] Bug fix (change which fixes an issue) * [ ] Bug fix (change which fixes an issue).
* [ ] New feature (change which adds functionality) * [ ] New feature (change which adds functionality).
* [ ] New Server (new server added) * [ ] New Server (new server added).
* [ ] Refactor (restructures existing code) * [ ] Refactor (restructures existing code).
* [ ] This change requires a documentation update * [ ] Comment update (typo, spelling, etc).
* [ ] This change requires a documentation update.
## Checklist ## Checklist
* [ ] My code follows the style guidelines of this project * [ ] This code follows the style guidelines of this project.
* [ ] This pull request links to an issue * [ ] This pull request links to an issue.
* [ ] This pull request uses the `develop` branch as its base * [ ] This pull request uses the `develop` branch as its base.
* [ ] I have performed a self-review of my own code * [ ] I have provided Co-author details below.
* [ ] I have squashed commits * [ ] I have performed a self-review of my own code.
* [ ] I have commented my code, particularly in hard to understand areas * [ ] I have squashed commits.
* [ ] I have made corresponding changes to the documentation if required * [ ] I have commented my code, particularly in hard to understand areas.
* [ ] I have made corresponding changes to the documentation if required.
## Provide Github Email
Fill out below info or tick box below:
```
Co-authored-by: John Doe <name@example.com>
```
- [ ] I do not wish to provide an email. I am aware this will hide me as the author of this commit.
All pull requests will now be squashed to create a tidy commit history and simplify changelog creation. You can provide either your own email or a GitHub-provided no-reply email.
When a PR is squashed the author becomes the person who squashed the PR. This removes you as the author of your own PR.
The only workaround for this is to add your details as a co-author. More info about co-authors can be found [here](https://help.github.com/en/articles/creating-a-commit-with-multiple-authors).

15
README.md

File diff suppressed because one or more lines are too long

7
lgsm/config-default/config-lgsm/bsserver/_default.cfg

@ -20,9 +20,14 @@ sourcetvport="27020"
defaultmap="duel_winter" defaultmap="duel_winter"
maxplayers="16" maxplayers="16"
## Required: Game Server Login Token
# GSLT is required for running a public server.
# More info: https://linuxgsm.com/gslt
gslt=""
## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
fn_parms(){ fn_parms(){
parms="-autoupdate -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" parms="-game "${serverfiles}/berimbau" -autoupdate -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
} }
#### LinuxGSM Settings #### #### LinuxGSM Settings ####

135
lgsm/config-default/config-lgsm/dysserver/_default.cfg

@ -0,0 +1,135 @@
##################################
######## Default Settings ########
##################################
# DO NOT EDIT WILL BE OVERWRITTEN!
# Copy settings from here and use them in either
# common.cfg - applies settings to every instance
# [instance].cfg - applies settings to a specific instance
#### Server Settings ####
## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters
ip="0.0.0.0"
port="27015"
clientport="27005"
sourcetvport="27020"
defaultmap="dys_broadcast"
maxplayers="16"
## Optional: Game Server Login Token
# GSLT can be used for running a public server.
# More info: https://linuxgsm.com/gslt
gslt=""
## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
fn_parms(){
parms="-game "${serverfiles}/dystopia" -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
}
#### LinuxGSM Settings ####
## Notification Alerts
# (on|off)
# More info | https://docs.linuxgsm.com/alerts#more-info
postalert="off"
postdays="7"
posttarget="https://hastebin.com"
# Discord Alerts | https://docs.linuxgsm.com/alerts/discord
discordalert="off"
discordwebhook="webhook"
# Email Alerts | https://docs.linuxgsm.com/alerts/email
emailalert="off"
email="[email protected]"
emailfrom=""
# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt
iftttalert="off"
ifttttoken="accesstoken"
iftttevent="linuxgsm_alert"
# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun
mailgunalert="off"
mailguntoken="accesstoken"
mailgundomain="example.com"
mailgunemailfrom="[email protected]"
mailgunemail="[email protected]"
# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
pushbulletalert="off"
pushbullettoken="accesstoken"
channeltag=""
# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
pushoveralert="off"
pushovertoken="accesstoken"
# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring".
# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need
# any custom string in curl - simple ignore this parameter.
telegramalert="off"
telegramtoken="accesstoken"
telegramchatid=""
curlcustomstring=""
## Updating | https://docs.linuxgsm.com/commands/update
updateonstart="off"
## Backup | https://docs.linuxgsm.com/commands/backup
maxbackups="4"
maxbackupdays="30"
stoponbackup="on"
## Logging | https://docs.linuxgsm.com/features/logging
consolelogging="on"
logdays="7"
#### LinuxGSM Advanced Settings ####
# ANSI Colors
ansi="on"
## SteamCMD Settings
# Server appid
appid="17585"
# 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="Dystopia"
engine="source"
#### Directories ####
# Edit with care
## Server Specific Directories
systemdir="${serverfiles}/dystopia"
executabledir="${serverfiles}/bin"
executable="./srcds_run.sh"
servercfg="${servicename}.cfg"
servercfgdefault="server.cfg"
servercfgdir="${systemdir}/cfg"
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"

130
lgsm/config-default/config-lgsm/ndserver/_default.cfg

@ -0,0 +1,130 @@
##################################
######## Default Settings ########
##################################
# DO NOT EDIT WILL BE OVERWRITTEN!
# Copy settings from here and use them in either
# common.cfg - applies settings to every instance
# [instance].cfg - applies settings to a specific instance
#### Server Settings ####
## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters
ip="0.0.0.0"
port="27015"
clientport="27005"
sourcetvport="27020"
defaultmap="hydro"
maxplayers="32"
## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
fn_parms(){
parms="-game nucleardawn -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
}
#### LinuxGSM Settings ####
## Notification Alerts
# (on|off)
# More info | https://docs.linuxgsm.com/alerts#more-info
postalert="off"
postdays="7"
posttarget="https://hastebin.com"
# Discord Alerts | https://docs.linuxgsm.com/alerts/discord
discordalert="off"
discordwebhook="webhook"
# Email Alerts | https://docs.linuxgsm.com/alerts/email
emailalert="off"
email="[email protected]"
emailfrom=""
# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt
iftttalert="off"
ifttttoken="accesstoken"
iftttevent="linuxgsm_alert"
# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun
mailgunalert="off"
mailguntoken="accesstoken"
mailgundomain="example.com"
mailgunemailfrom="[email protected]"
mailgunemail="[email protected]"
# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
pushbulletalert="off"
pushbullettoken="accesstoken"
channeltag=""
# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
pushoveralert="off"
pushovertoken="accesstoken"
# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring".
# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need
# any custom string in curl - simple ignore this parameter.
telegramalert="off"
telegramtoken="accesstoken"
telegramchatid=""
curlcustomstring=""
## Updating | https://docs.linuxgsm.com/commands/update
updateonstart="off"
## Backup | https://docs.linuxgsm.com/commands/backup
maxbackups="4"
maxbackupdays="30"
stoponbackup="on"
## Logging | https://docs.linuxgsm.com/features/logging
consolelogging="on"
logdays="7"
#### LinuxGSM Advanced Settings ####
# ANSI Colors
ansi="on"
## SteamCMD Settings
# Server appid
appid="111710"
# 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="Nuclear Dawn"
engine="source"
#### Directories ####
# Edit with care
## Server Specific Directories
systemdir="${serverfiles}/nucleardawn"
executabledir="${serverfiles}"
executable="./srcds_run"
servercfg="${servicename}.cfg"
servercfgdefault="server.cfg"
servercfgdir="${systemdir}/cfg"
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/data/serverlist.csv

@ -25,6 +25,7 @@ doi,doiserver,Day of Infamy
dmc,dmcserver,Deathmatch Classic dmc,dmcserver,Deathmatch Classic
dst,dstserver,Don't Starve Together dst,dstserver,Don't Starve Together
dab,dabserver,Double Action: Boogaloo dab,dabserver,Double Action: Boogaloo
dys,dysserver,Dystopia
eco,ecoserver,Eco eco,ecoserver,Eco
em,emserver,Empires Mod em,emserver,Empires Mod
fctr,fctrserver,Factorio fctr,fctrserver,Factorio
@ -47,6 +48,7 @@ l4d2,l4d2server,Left 4 Dead 2
mc,mcserver,Minecraft mc,mcserver,Minecraft
mta,mtaserver,Multi Theft Auto mta,mtaserver,Multi Theft Auto
mumble,mumbleserver,Mumble mumble,mumbleserver,Mumble
nd,ndserver,Nuclear Dawn
nmrih,nmrihserver,No More Room in Hell nmrih,nmrihserver,No More Room in Hell
ns,nsserver,Natural Selection ns,nsserver,Natural Selection
ns2,ns2server,Natural Selection 2 ns2,ns2server,Natural Selection 2

1 arma3 arma3server ARMA 3
25 dmc dmcserver Deathmatch Classic
26 dst dstserver Don't Starve Together
27 dab dabserver Double Action: Boogaloo
28 dys dysserver Dystopia
29 eco ecoserver Eco
30 em emserver Empires Mod
31 fctr fctrserver Factorio
48 mc mcserver Minecraft
49 mta mtaserver Multi Theft Auto
50 mumble mumbleserver Mumble
51 nd ndserver Nuclear Dawn
52 nmrih nmrihserver No More Room in Hell
53 ns nsserver Natural Selection
54 ns2 ns2server Natural Selection 2

5
lgsm/functions/check_executable.sh

@ -9,10 +9,11 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Check if executable exists # Check if executable exists
if [ ! -f "${executabledir}/${execname}" ]; then if [ ! -f "${executabledir}/${execname}" ]; then
fn_print_fail_nl "executable was not found:" fn_print_fail_nl "executable was not found"
echo " * ${executabledir}/${execname}" echo "* ${executabledir}/${execname}"
if [ -d "${lgsmlogdir}" ]; then if [ -d "${lgsmlogdir}" ]; then
fn_script_log_fatal "Executable was not found: ${executabledir}/${execname}" fn_script_log_fatal "Executable was not found: ${executabledir}/${execname}"
fi fi
unset exitbypass
core_exit.sh core_exit.sh
fi fi

2
lgsm/functions/command_debug.sh

@ -104,6 +104,8 @@ elif [ "${engine}" == "realvirtuality" ]; then
# be escaped for regular (tmux) loading, but need to be # be escaped for regular (tmux) loading, but need to be
# stripped when loading straight from the console. # stripped when loading straight from the console.
${executable} ${parms//\\;/;} ${executable} ${parms//\\;/;}
elif [ "${engine}" == "quake" ]; then
${executable} ${parms} -condebug
else else
${executable} ${parms} ${executable} ${parms}
fi fi

16
lgsm/functions/command_dev_query_raw.sh

@ -55,4 +55,18 @@ if [ "${querystatus}" == "0" ]; then
echo "tcp query PASS" echo "tcp query PASS"
else else
echo "tcp query FAIL" echo "tcp query FAIL"
fi fi
echo""
echo "================================="
echo "udp Raw Output"
echo "================================="
echo""
echo "bash -c 'exec 3<> /dev/udp/'${ip}'/'${queryport}''"
bash -c 'exec 3<> /dev/udp/'${ip}'/'${queryport}''
querystatus="$?"
if [ "${querystatus}" == "0" ]; then
echo "udp query PASS"
else
echo "udp query FAIL"
fi

8
lgsm/functions/command_fastdl.sh

@ -154,7 +154,7 @@ fn_fastdl_preview(){
# Garry's Mod # Garry's Mod
if [ "${shortname}" == "gmod" ]; 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" "*.svg" "*.vtf" "*.vmt" "*.vtx" "*.vvd" "*.ttf" "*.wav" )
for allowed_extention in "${allowed_extentions_array[@]}"; do for allowed_extention in "${allowed_extentions_array[@]}"; do
fileswc=0 fileswc=0
tput sc tput sc
@ -176,7 +176,7 @@ fn_fastdl_preview(){
if [ "${directory}" == "maps" ]; then if [ "${directory}" == "maps" ]; then
local allowed_extentions_array=( "*.bsp" "*.ain" "*.nav" "*.jpg" "*.txt" ) local allowed_extentions_array=( "*.bsp" "*.ain" "*.nav" "*.jpg" "*.txt" )
elif [ "${directory}" == "materials" ]; then elif [ "${directory}" == "materials" ]; then
local allowed_extentions_array=( "*.vtf" "*.vmt" "*.vbf" ) local allowed_extentions_array=( "*.vtf" "*.vmt" "*.vbf" "*.png" "*.svg" )
elif [ "${directory}" == "models" ]; then elif [ "${directory}" == "models" ]; then
local allowed_extentions_array=( "*.vtx" "*.vvd" "*.mdl" "*.phy" "*.jpg" "*.png" ) local allowed_extentions_array=( "*.vtx" "*.vvd" "*.mdl" "*.phy" "*.jpg" "*.png" )
elif [ "${directory}" == "particles" ]; then elif [ "${directory}" == "particles" ]; then
@ -315,7 +315,7 @@ fn_fastdl_source(){
if [ "${directory}" == "maps" ]; then if [ "${directory}" == "maps" ]; then
local allowed_extentions_array=( "*.bsp" "*.ain" "*.nav" "*.jpg" "*.txt" ) local allowed_extentions_array=( "*.bsp" "*.ain" "*.nav" "*.jpg" "*.txt" )
elif [ "${directory}" == "materials" ]; then elif [ "${directory}" == "materials" ]; then
local allowed_extentions_array=( "*.vtf" "*.vmt" "*.vbf" ) local allowed_extentions_array=( "*.vtf" "*.vmt" "*.vbf" "*.png" "*.svg" )
elif [ "${directory}" == "models" ]; then elif [ "${directory}" == "models" ]; then
local allowed_extentions_array=( "*.vtx" "*.vvd" "*.mdl" "*.phy" "*.jpg" "*.png" ) local allowed_extentions_array=( "*.vtx" "*.vvd" "*.mdl" "*.phy" "*.jpg" "*.png" )
elif [ "${directory}" == "particles" ]; then elif [ "${directory}" == "particles" ]; then
@ -430,4 +430,4 @@ echo "FastDL files are located in:"
echo "${fastdldir}" echo "${fastdldir}"
echo "FastDL completed" echo "FastDL completed"
fn_script_log_info "FastDL completed" fn_script_log_info "FastDL completed"
core_exit.sh core_exit.sh

4
lgsm/functions/command_install.sh

@ -32,7 +32,7 @@ else
# Configuration # Configuration
install_config.sh install_config.sh
if [ "${shortname}" == "bb2" ]||[ "${shortname}" == "bmdm" ]||[ "${shortname}" == "csgo" ]||[ "${shortname}" == "em" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "tf2" ]||[ "${shortname}" == "tu" ]; then if [ -v "${gslt}" ]; then
install_gslt.sh install_gslt.sh
elif [ "${shortname}" == "dst" ]; then elif [ "${shortname}" == "dst" ]; then
install_dst_token.sh install_dst_token.sh
@ -47,4 +47,4 @@ else
fix.sh fix.sh
install_complete.sh install_complete.sh
core_exit.sh core_exit.sh
fi fi

3
lgsm/functions/command_monitor.sh

@ -124,6 +124,7 @@ fn_monitor_check_session(){
fn_script_log_info "Monitor is starting ${servername}" fn_script_log_info "Monitor is starting ${servername}"
sleep 0.5 sleep 0.5
command_restart.sh command_restart.sh
core_exit.sh
fi fi
sleep 0.5 sleep 0.5
} }
@ -195,4 +196,4 @@ elif [ "${shortname}" == "ts3" ]||[ "${shortname}" == "eco" ]||[ "${shortname}"
else else
fn_monitor_query fn_monitor_query
fi fi
core_exit.sh core_exit.sh

6
lgsm/functions/command_start.sh

@ -32,11 +32,7 @@ fn_start_teamspeak3(){
date > "${rootdir}/${lockselfname}" date > "${rootdir}/${lockselfname}"
# Accept license # Accept license
if [ ! -f "${executabledir}/.ts3server_license_accepted" ]; then if [ ! -f "${executabledir}/.ts3server_license_accepted" ]; then
fn_script_log "Accepting ts3server license: ${executabledir}/LICENSE" install_eula.sh
fn_print_info_nl "Accepting TeamSpeak license:"
echo " * ${executabledir}/LICENSE"
sleep 3
touch "${executabledir}/.ts3server_license_accepted"
fi fi
cd "${executabledir}" cd "${executabledir}"
if [ "${ts3serverpass}" == "1" ]; then if [ "${ts3serverpass}" == "1" ]; then

22
lgsm/functions/core_functions.sh

@ -357,6 +357,11 @@ functionfile="${FUNCNAME}"
fn_fetch_function fn_fetch_function
} }
fix_tf2.sh(){
functionfile="${FUNCNAME}"
fn_fetch_function
}
fix_ut3.sh(){ fix_ut3.sh(){
functionfile="${FUNCNAME}" functionfile="${FUNCNAME}"
fn_fetch_function fn_fetch_function
@ -565,32 +570,27 @@ functionfile="${FUNCNAME}"
fn_fetch_function fn_fetch_function
} }
install_gsquery.sh(){ install_eula.sh(){
functionfile="${FUNCNAME}"
fn_fetch_function
}
install_gslt.sh(){
functionfile="${FUNCNAME}" functionfile="${FUNCNAME}"
fn_fetch_function fn_fetch_function
} }
install_header.sh(){ install_gsquery.sh(){
functionfile="${FUNCNAME}" functionfile="${FUNCNAME}"
fn_fetch_function fn_fetch_function
} }
install_logs.sh(){ install_gslt.sh(){
functionfile="${FUNCNAME}" functionfile="${FUNCNAME}"
fn_fetch_function fn_fetch_function
} }
install_minecraft_eula.sh(){ install_header.sh(){
functionfile="${FUNCNAME}" functionfile="${FUNCNAME}"
fn_fetch_function fn_fetch_function
} }
install_unreal_tournament_eula.sh(){ install_logs.sh(){
functionfile="${FUNCNAME}" functionfile="${FUNCNAME}"
fn_fetch_function fn_fetch_function
} }
@ -654,4 +654,4 @@ core_messages.sh
core_dl.sh core_dl.sh
# Calls the global Ctrl-C trap # Calls the global Ctrl-C trap
core_trap.sh core_trap.sh

2
lgsm/functions/core_getopt.sh

@ -90,7 +90,7 @@ if [ "${engine}" == "source" ]; then
fi fi
# TeamSpeak exclusive # TeamSpeak exclusive
if [ "${shortname}" != "ts3" ]; then if [ "${shortname}" == "ts3" ]; then
currentopt+=( "${cmd_change_password[@]}" ) currentopt+=( "${cmd_change_password[@]}" )
fi fi

45
lgsm/functions/fix.sh

@ -61,8 +61,10 @@ if [ "${function_selfname}" != "command_install.sh" ]&&[ -z "${fixbypass}" ]; th
fix_sdtd.sh fix_sdtd.sh
elif [ "${shortname}" == "ss3" ]; then elif [ "${shortname}" == "ss3" ]; then
fix_ss3.sh fix_ss3.sh
elif [ "${shortname}" == "tf2" ]; then
fix_tf2.sh
elif [ "${shortname}" == "ts3" ]; then elif [ "${shortname}" == "ts3" ]; then
fix_ts3.sh fix_ts3.sh
elif [ "${shortname}" == "mta" ]; then elif [ "${shortname}" == "mta" ]; then
fix_mta.sh fix_mta.sh
elif [ "${shortname}" == "wurm" ]; then elif [ "${shortname}" == "wurm" ]; then
@ -72,26 +74,25 @@ fi
# Fixes that are run on install only. # Fixes that are run on install only.
if [ "${function_selfname}" == "command_install.sh" ]; then if [ "${function_selfname}" == "command_install.sh" ]; then
echo "" if [ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then
echo "Applying Post-Install Fixes" echo ""
echo "=================================" echo "Applying Post-Install Fixes"
sleep 0.5 echo "================================="
if [ "${shortname}" == "kf" ]; then sleep 0.5
fix_kf.sh if [ "${shortname}" == "kf" ]; then
elif [ "${shortname}" == "kf2" ]; then fix_kf.sh
fix_kf2.sh elif [ "${shortname}" == "kf2" ]; then
elif [ "${shortname}" == "ro" ]; then fix_kf2.sh
fix_ro.sh elif [ "${shortname}" == "ro" ]; then
elif [ "${shortname}" == "ut2k4" ]; then fix_ro.sh
fix_ut2k4.sh elif [ "${shortname}" == "ut2k4" ]; then
elif [ "${shortname}" == "ut" ]; then fix_ut2k4.sh
fix_ut.sh elif [ "${shortname}" == "ut" ]; then
elif [ "${shortname}" == "ut3" ]; then fix_ut.sh
fix_ut3.sh elif [ "${shortname}" == "ut3" ]; then
elif [ "${shortname}" == "tf2" ]; then fix_ut3.sh
fix_tf2.sh else
else fn_print_information_nl "No fixes required."
fn_print_information_nl "No fixes required." fi
fi fi
fi fi

4
lgsm/functions/fix_dst.sh

@ -11,8 +11,8 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: ./dontstarve_dedicated_server_nullrenderer: ./lib32/libcurl-gnutls.so.4: no version information available (required by ./dontstarve_dedicated_server_nullrenderer) # Fixes: ./dontstarve_dedicated_server_nullrenderer: ./lib32/libcurl-gnutls.so.4: no version information available (required by ./dontstarve_dedicated_server_nullrenderer)
# Issue only occures on CentOS as libcurl-gnutls.so.4 is called libcurl.so.4 on CentOS. # Issue only occures on CentOS as libcurl-gnutls.so.4 is called libcurl.so.4 on CentOS.
if [ -f "/etc/redhat-release" ]&&[ ! -f "${serverfiles}/bin/lib32/libcurl-gnutls.so.4" ]; then if [ -f "/etc/redhat-release" ]&&[ ! -f "${serverfiles}/bin/lib32/libcurl-gnutls.so.4" ]; then
fixname="libcurl-gnutls.so.4 missing" fixname="libcurl-gnutls.so.4"
fn_fix_msg_start fn_fix_msg_start
ln -s "/usr/lib/libcurl.so.4" "${serverfiles}/bin/lib32/libcurl-gnutls.so.4" ln -s "/usr/lib/libcurl.so.4" "${serverfiles}/bin/lib32/libcurl-gnutls.so.4"
fn_fix_msg_end fn_fix_msg_end
fi fi

2
lgsm/functions/fix_mta.sh

@ -16,4 +16,4 @@ if [ ! -f "${lgsmdir}/lib/libmysqlclient.so.16" ]; then
fn_fix_msg_end fn_fix_msg_end
fi fi
export LD_LIBRARY_PATH=:"${libdir}" export LD_LIBRARY_PATH=:"${libdir}"

5
lgsm/functions/fix_ss3.sh

@ -10,5 +10,8 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes https://steamcommunity.com/app/41070/discussions/0/353916981477716386/ # Fixes https://steamcommunity.com/app/41070/discussions/0/353916981477716386/
if [ "$(diff "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Bin/steamclient.so" >/dev/null)" ]; then if [ "$(diff "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Bin/steamclient.so" >/dev/null)" ]; then
fixname="steamclient.so"
fn_fix_msg_start
cp -f "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Bin/steamclient.so" cp -f "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Bin/steamclient.so"
fi fn_fix_msg_end
fi

8
lgsm/functions/fix_steamcmd.sh

@ -10,7 +10,7 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# 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 "${HOME}/.steam/sdk32/steamclient.so" ]; then if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then
fixname="steamclient.so general" fixname="steamclient.so"
fn_fix_msg_start fn_fix_msg_start
mkdir -pv "${HOME}/.steam/sdk32" >> "${lgsmlog}" mkdir -pv "${HOME}/.steam/sdk32" >> "${lgsmlog}"
cp -v "${steamcmddir}/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${lgsmlog}" cp -v "${steamcmddir}/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${lgsmlog}"
@ -23,7 +23,7 @@ if [ "${shortname}" == "ss3" ]; then
fixname="libsteam.so" fixname="libsteam.so"
fn_fix_msg_start fn_fix_msg_start
mkdir -pv "${HOME}/.steam/bin32" >> "${lgsmlog}" mkdir -pv "${HOME}/.steam/bin32" >> "${lgsmlog}"
cp -v "${serverfiles}/Bin/libsteam.so" "${HOME}/.steam/bin32/libsteam.so" >> "${lgsmlog}" cp "${serverfiles}/Bin/libsteam.so" "${HOME}/.steam/bin32/libsteam.so" >> "${lgsmlog}"
fn_fix_msg_end fn_fix_msg_end
fi fi
elif [ "${shortname}" == "hw" ]; then elif [ "${shortname}" == "hw" ]; then
@ -31,13 +31,13 @@ elif [ "${shortname}" == "hw" ]; then
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"
fn_fix_msg_start fn_fix_msg_start
cp -v "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${lgsmlog}" cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${lgsmlog}"
fn_fix_msg_end fn_fix_msg_end
fi fi
if [ ! -f "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" ]; then if [ ! -f "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" ]; then
fixname="steamclient.so x86_64" fixname="steamclient.so x86_64"
fn_fix_msg_start fn_fix_msg_start
cp -v "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}" cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}"
fn_fix_msg_end fn_fix_msg_end
fi fi
elif [ "${shortname}" == "tu" ]; then elif [ "${shortname}" == "tu" ]; then

2
lgsm/functions/fix_tf2.sh

@ -10,7 +10,7 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: Team Fortress 2 Segmentation fault for Red-Hat Distros #2062. # Fixes: Team Fortress 2 Segmentation fault for Red-Hat Distros #2062.
if [ -f "/etc/redhat-release" ]&&[ ! -f "${serverfiles}/bin/libcurl-gnutls.so.4" ]; then if [ -f "/etc/redhat-release" ]&&[ ! -f "${serverfiles}/bin/libcurl-gnutls.so.4" ]; then
fixname="libcurl-gnutls.so.4 missing" fixname="libcurl-gnutls.so.4"
fn_fix_msg_start fn_fix_msg_start
ln -s "/usr/lib/libcurl.so.4" "${serverfiles}/bin/libcurl-gnutls.so.4" ln -s "/usr/lib/libcurl.so.4" "${serverfiles}/bin/libcurl-gnutls.so.4"
fn_fix_msg_end fn_fix_msg_end

7
lgsm/functions/fix_ts3.sh

@ -10,5 +10,8 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: makes libmariadb2 available #1924 # Fixes: makes libmariadb2 available #1924
if [ ! -f "${serverfiles}/libmariadb.so.2" ]; then if [ ! -f "${serverfiles}/libmariadb.so.2" ]; then
ln -s "${serverfiles}/redist/libmariadb.so.2" "${serverfiles}/libmariadb.so.2" fixname="libmariadb.so.2"
fi fn_fix_msg_start
cp "${serverfiles}/redist/libmariadb.so.2" "${serverfiles}/libmariadb.so.2"
fn_fix_msg_end
fi

8
lgsm/functions/info_config.sh

@ -320,6 +320,7 @@ fn_info_config_inss(){
rconport=${rconport:-"0"} rconport=${rconport:-"0"}
fi fi
} }
fn_info_config_minecraft(){ fn_info_config_minecraft(){
if [ ! -f "${servercfgfullpath}" ]; then if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}" servername="${unavailable}"
@ -329,7 +330,6 @@ fn_info_config_minecraft(){
port="${zero}" port="${zero}"
queryport="${zero}" queryport="${zero}"
queryenabled="${unavailable}" queryenabled="${unavailable}"
rconport="${zero}"
gamemode="${unavailable}" gamemode="${unavailable}"
gameworld="${unavailable}" gameworld="${unavailable}"
else else
@ -338,9 +338,8 @@ fn_info_config_minecraft(){
rconport=$(grep "rcon.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') rconport=$(grep "rcon.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
port=$(grep "server-port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') port=$(grep "server-port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
queryport=$(grep "query.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') queryport="${port}"
queryenabled=$(grep "enable-query" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/enable-query//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') queryenabled=$(grep "enable-query" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/enable-query//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
rconport=$(grep "rcon.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
gamemode=$(grep "gamemode" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') gamemode=$(grep "gamemode" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
@ -354,9 +353,10 @@ fn_info_config_minecraft(){
rconport=${rconport:-"NOT SET"} rconport=${rconport:-"NOT SET"}
maxplayers=${maxplayers:-"NOT SET"} maxplayers=${maxplayers:-"NOT SET"}
port=${port:-"NOT SET"} port=${port:-"NOT SET"}
queryport="${queryport:-"NOT SET"}"
queryenabled="${queryenabled:-"NOT SET"}"
gamemode=${gamemode:-"NOT SET"} gamemode=${gamemode:-"NOT SET"}
gameworld=${gameworld:-"NOT SET"} gameworld=${gameworld:-"NOT SET"}
fi fi
} }

3
lgsm/functions/info_glibc.sh

@ -51,6 +51,9 @@ elif [ "${gamename}" == "Day of Infamy" ]; then
elif [ "${gamename}" == "Double Action: Boogaloo" ]; then elif [ "${gamename}" == "Double Action: Boogaloo" ]; then
glibcrequired="2.15" glibcrequired="2.15"
glibcfix="yes" glibcfix="yes"
elif [ "${gamename}" == "Dystopia" ]; then
glibcrequired="2.15"
glibcfix="no"
elif [ "${gamename}" == "Eco" ]; then elif [ "${gamename}" == "Eco" ]; then
glibcrequired="NOT REQUIRED" glibcrequired="NOT REQUIRED"
glibcfix="no" glibcfix="no"

6
lgsm/functions/info_messages.sh

@ -78,7 +78,7 @@ fn_info_message_performance(){
echo -e "${blue}CPU Model:\t${default}${cpumodel}" echo -e "${blue}CPU Model:\t${default}${cpumodel}"
echo -e "${blue}CPU Cores:\t${default}${cpucores}" echo -e "${blue}CPU Cores:\t${default}${cpucores}"
echo -e "${blue}CPU Frequency:\t${default}${cpufreuency}" echo -e "${blue}CPU Frequency:\t${default}${cpufreuency}"
} | column -s $'\t' -t } | column -s $'\t' -t
echo -e "" echo -e ""
{ {
echo -e "${blue}Mem:\t${blue}total\tused\tfree\tcached\tavailable${default}" echo -e "${blue}Mem:\t${blue}total\tused\tfree\tcached\tavailable${default}"
@ -737,8 +737,8 @@ fn_info_message_minecraft(){
{ {
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "> Game\tINBOUND\t${port}\ttcp" echo -e "> Game\tINBOUND\t${port}\ttcp"
echo -e "> Game\tINBOUND\t${queryport}\tudp" echo -e "> Query\tINBOUND\t${queryport}\tudp"
echo -e "> Game\tINBOUND\t${rconport}\ttcp" echo -e "> Rcon\tINBOUND\t${rconport}\ttcp"
} | column -s $'\t' -t } | column -s $'\t' -t
} }

3
lgsm/functions/install_complete.sh

@ -8,6 +8,7 @@ local commandname="INSTALL"
local commandaction="Install" local commandaction="Install"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo ""
echo "=================================" echo "================================="
echo "Install Complete!" echo "Install Complete!"
fn_script_log_info "Install Complete!" fn_script_log_info "Install Complete!"
@ -15,4 +16,4 @@ echo ""
echo "To start server type:" echo "To start server type:"
echo "./${selfname} start" echo "./${selfname} start"
echo "" echo ""
core_exit.sh core_exit.sh

12
lgsm/functions/install_config.sh

@ -313,6 +313,12 @@ elif [ "${gamename}" == "Double Action: Boogaloo" ]; then
fn_fetch_default_config fn_fetch_default_config
fn_default_config_remote fn_default_config_remote
fn_set_config_vars fn_set_config_vars
elif [ "${gamename}" == "Dystopia" ]; then
gamedirname="Dystopia"
array_configs+=( server.cfg )
fn_fetch_default_config
fn_default_config_remote
fn_set_config_vars
elif [ "${gamename}" == "ET: Legacy" ]; then elif [ "${gamename}" == "ET: Legacy" ]; then
gamedirname="ETLegacy" gamedirname="ETLegacy"
array_configs+=( server.cfg ) array_configs+=( server.cfg )
@ -433,6 +439,12 @@ elif [ "${gamename}" == "No More Room in Hell" ]; then
fn_fetch_default_config fn_fetch_default_config
fn_default_config_remote fn_default_config_remote
fn_set_config_vars fn_set_config_vars
elif [ "${gamename}" == "Nuclear Dawn" ]; then
gamedirname="NuclearDawn"
array_configs+=( server.cfg )
fn_fetch_default_config
fn_default_config_remote
fn_set_config_vars
elif [ "${gamename}" == "Multi Theft Auto" ]; then elif [ "${gamename}" == "Multi Theft Auto" ]; then
gamedirname="MultiTheftAuto" gamedirname="MultiTheftAuto"
fn_check_cfgdir fn_check_cfgdir

45
lgsm/functions/install_eula.sh

@ -0,0 +1,45 @@
#!/bin/bash
# LinuxGSM install_eula.sh function
# Author: Daniel Gibbs
# Website: https://linuxgsm.com
# Description: Gets user to accept the EULA.
if [ "${shortname}" == "ts3" ]; then
eulaurl="https://www.teamspeak.com/en/privacy-and-terms"
elif [ "${shortname}" == "mc" ]; then
eulaurl="https://account.mojang.com/documents/minecraft_eula"
elif [ "${shortname}" == "ut" ]; then
eulaurl="https://www.epicgames.com/unrealtournament/unreal-tournament-pre-alpha-test-development-build-eula"
fi
echo ""
echo "Accept ${gamename} EULA"
echo "================================="
sleep 0.5
echo "You are required to accept the EULA:"
echo "${eulaurl}"
echo ""
if [ -z "${autoinstall}" ]; then
echo "By continuing you are indicating your agreement to the EULA."
echo ""
if ! fn_prompt_yn "Continue?" Y; then
core_exit.sh
fi
elif [ "${function_selfname}" == "command_start.sh" ]; then
fn_print_info "By continuing you are indicating your agreement to the EULA."
echo ""
sleep 5
else
echo "By using auto-install you are indicating your agreement to the EULA."
echo ""
sleep 5
fi
if [ "${shortname}" == "ts3" ]; then
touch "${executabledir}/.ts3server_license_accepted"
elif [ "${shortname}" == "mc" ]; then
touch "${serverfiles}/eula.txt"
echo "eula=true" > "${serverfiles}/eula.txt"
elif [ "${shortname}" == "ut" ]; then
:
fi

8
lgsm/functions/install_gslt.sh

@ -12,7 +12,7 @@ echo ""
echo "Game Server Login Token" echo "Game Server Login Token"
echo "=================================" echo "================================="
sleep 0.5 sleep 0.5
if [ "${gamename}" == "Counter-Strike: Global Offensive" ]||[ "${gamename}" == "Counter-Strike: Source" ]||[ "${gamename}" == "No More Room in Hell" ]; then if [ "${shortname}" == "csgo" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "bs" ]; then
echo "GSLT is required to run a public ${gamename} server" echo "GSLT is required to run a public ${gamename} server"
fn_script_log_info "GSLT is required to run a public ${gamename} server" fn_script_log_info "GSLT is required to run a public ${gamename} server"
else else
@ -26,7 +26,7 @@ fn_script_log_info "Get more info and a token here:"
fn_script_log_info "https://linuxgsm.com/gslt" fn_script_log_info "https://linuxgsm.com/gslt"
echo "" echo ""
if [ -z "${autoinstall}" ]; then if [ -z "${autoinstall}" ]; then
if [ "${gamename}" != "Tower Unite" ]; then if [ "${shortname}" != "tu" ]; then
echo "Enter token below (Can be blank)." echo "Enter token below (Can be blank)."
echo -n "GSLT TOKEN: " echo -n "GSLT TOKEN: "
read -r token read -r token
@ -38,11 +38,11 @@ if [ -z "${autoinstall}" ]; then
fi fi
fi fi
sleep 0.5 sleep 0.5
if [ "${gamename}" == "Tower Unite" ]; then if [ "${shortname}" == "tu" ]; then
echo "The GSLT can be changed by editing ${servercfgdir}/${servercfg}." echo "The GSLT can be changed by editing ${servercfgdir}/${servercfg}."
fn_script_log_info "The GSLT can be changed by editing ${servercfgdir}/${servercfg}." fn_script_log_info "The GSLT can be changed by editing ${servercfgdir}/${servercfg}."
else else
echo "The GSLT can be changed by editing ${configdirserver}/${servicename}.cfg." echo "The GSLT can be changed by editing ${configdirserver}/${servicename}.cfg."
fn_script_log_info "The GSLT can be changed by editing ${configdirserver}/${servicename}.cfg." fn_script_log_info "The GSLT can be changed by editing ${configdirserver}/${servicename}.cfg."
fi fi
echo "" echo ""

28
lgsm/functions/install_minecraft_eula.sh

@ -1,28 +0,0 @@
#!/bin/bash
# LinuxGSM install_minecraft_eula.sh function
# Author: Daniel Gibbs
# Website: https://linuxgsm.com
# Description: Gets user to accept the EULA.
echo ""
echo "Accept ${gamename} EULA"
echo "================================="
sleep 0.5
echo "You are required to accept the EULA:"
echo "https://account.mojang.com/documents/minecraft_eula"
echo "eula=false" > "${serverfiles}/eula.txt"
if [ -z "${autoinstall}" ]; then
echo "By continuing you are indicating your agreement to the EULA."
echo ""
if ! fn_prompt_yn "Continue?" Y; then
core_exit.sh
fi
else
echo "By using auto-install you are indicating your agreement to the EULA."
echo ""
sleep 5
fi
sed -i "s/eula=false/eula=true/g" "${serverfiles}/eula.txt"

6
lgsm/functions/install_server_files.sh

@ -36,7 +36,7 @@ fn_install_server_files(){
elif [ "${shortname}" == "qw" ]; then elif [ "${shortname}" == "qw" ]; then
remote_fileurl="https://files.linuxgsm.com/QuakeWorld/nquake.server.linux.083116.full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="nquake.server.linux.083116.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="75a409cf08d808f075e4dacdc7b21b78" remote_fileurl="https://files.linuxgsm.com/QuakeWorld/nquake.server.linux.083116.full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="nquake.server.linux.083116.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="75a409cf08d808f075e4dacdc7b21b78"
elif [ "${shortname}" == "rtcw" ]; then elif [ "${shortname}" == "rtcw" ]; then
remote_fileurl="https://files.linuxgsm.com/ReturnToCastleWolfenstein/iortcw-1.51b-x86_64-server-linux-20190208.tar.bz2"; local_filedir="${tmpdir}"; local_filename="iortcw-1.51b-x86_64-server-linux-20190208.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="7e555481a3b98e168dfb5e6ddc2fb879" remote_fileurl="https://files.linuxgsm.com/ReturnToCastleWolfenstein/iortcw-1.51b-x86_64-server-linux-20190208.tar.bz2"; local_filedir="${tmpdir}"; local_filename="iortcw-1.51b-x86_64-server-linux-20190208.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="7e555481a3b98e168dfb5e6ddc2fb879"
elif [ "${shortname}" == "ut2k4" ]; then elif [ "${shortname}" == "ut2k4" ]; then
remote_fileurl="https://files.linuxgsm.com/UnrealTournament2004/ut2004-server-3369-2-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ut2004-server-3369-2-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="67c5e2cd9c2a4b04f163962ee41eff54" remote_fileurl="https://files.linuxgsm.com/UnrealTournament2004/ut2004-server-3369-2-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ut2004-server-3369-2-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="67c5e2cd9c2a4b04f163962ee41eff54"
elif [ "${shortname}" == "ut99" ]; then elif [ "${shortname}" == "ut99" ]; then
@ -137,7 +137,7 @@ fi
if [ "${shortname}" == "ts3" ]; then if [ "${shortname}" == "ts3" ]; then
update_ts3.sh update_ts3.sh
elif [ "${shortname}" == "mc" ]; then elif [ "${shortname}" == "mc" ]; then
install_minecraft_eula.sh install_eula.sh
update_minecraft.sh update_minecraft.sh
elif [ "${shortname}" == "mumble" ]; then elif [ "${shortname}" == "mumble" ]; then
update_mumble.sh update_mumble.sh
@ -148,7 +148,7 @@ elif [ "${shortname}" == "fctr" ]; then
install_factorio_save.sh install_factorio_save.sh
elif [ -z "${appid}" ]||[ "${shortname}" == "ges" ]||[ "${shortname}" == "bd" ]||[ "${shortname}" == "bb" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "vs" ]; then elif [ -z "${appid}" ]||[ "${shortname}" == "ges" ]||[ "${shortname}" == "bd" ]||[ "${shortname}" == "bb" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "vs" ]; then
if [ "${shortname}" == "ut" ]; then if [ "${shortname}" == "ut" ]; then
install_unreal_tournament_eula.sh install_eula.sh
fi fi
fn_install_server_files fn_install_server_files
fi fi

55
lgsm/functions/install_ts3db.sh

@ -10,20 +10,22 @@ local commandaction="Install"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_install_ts3db_mariadb(){ fn_install_ts3db_mariadb(){
echo "" if [ ! -f "${serverfiles}/libts3db_mariadb.so" ]; then
echo "checking if libmariadb2 is installed" echo -e "copying libmariadb.so.2...\c"
echo "=================================" cp "${serverfiles}/redist/libmariadb.so.2" "${serverfiles}"
sleep 0.5 local exitcode=$?
if [ "${exitcode}" == "0" ]; then
if ldd "${serverfiles}/libts3db_mariadb.so" | grep "libmariadb.so.2 => not found"; then fn_print_ok_eol_nl
echo "libmariadb2 not installed. Please install it first." fn_script_log_pass "copying libmariadb.so.2"
echo "exiting..." else
exit fn_print_fail_eol_nl
else fn_script_log_fatal "copying libmariadb.so.2"
echo "libmariadb2 installed." core_exit.sh
fi
fi fi
echo "" echo ""
echo "Configuring ${gamename} Server for MariaDB/MySQL" echo "Configure ${gamename} Server for MariaDB"
echo "=================================" echo "================================="
sleep 0.5 sleep 0.5
read -rp "Enter MariaDB hostname: " mariahostname read -rp "Enter MariaDB hostname: " mariahostname
@ -31,47 +33,46 @@ fn_install_ts3db_mariadb(){
read -rp "Enter MariaDB username: " mariausername read -rp "Enter MariaDB username: " mariausername
read -rp "Enter MariaDB password: " mariapassword read -rp "Enter MariaDB password: " mariapassword
read -rp "Enter MariaDB database name: " mariadbname read -rp "Enter MariaDB database name: " mariadbname
read -rp "Enter MariaDB socket path: " mariadbsocket
{ {
echo "updating config."
echo "[config]" echo "[config]"
echo "host='${mariahostname}'" echo "host='${mariahostname}'"
echo "port='${mariaport}'" echo "port='${mariaport}'"
echo "username='${mariausername}'" echo "username='${mariausername}'"
echo "password='${mariapassword}'" echo "password='${mariapassword}'"
echo "database='${mariadbname}'" echo "database='${mariadbname}'"
echo "socket=" echo "socket='${mariadbsocket}'"
} >> "${servercfgdir}/ts3db_mariadb.ini" } >> "${servercfgdir}/ts3db_mariadb.ini"
sed -i "s/dbplugin=ts3db_sqlite3/dbplugin=ts3db_mariadb/g" "${servercfgfullpath}" sed -i "s/dbplugin=ts3db_sqlite3/dbplugin=ts3db_mariadb/g" "${servercfgfullpath}"
sed -i "s/dbpluginparameter=/dbpluginparameter=ts3db_mariadb.ini/g" "${servercfgfullpath}" sed -i "s/dbpluginparameter=/dbpluginparameter=ts3db_mariadb.ini/g" "${servercfgfullpath}"
sed -i "s/dbsqlcreatepath=create_sqlite\//dbsqlcreatepath=create_mariadb\//g" "${servercfgfullpath}" sed -i "s/dbsqlcreatepath=create_sqlite\//dbsqlcreatepath=create_mariadb\//g" "${servercfgfullpath}"
echo "=================================" echo "updating ts3db_mariadb.ini."
sleep 0.5 sleep 0.5
} }
echo ""
echo "Select Database"
echo "================================="
sleep 0.5
if [ -z "${autoinstall}" ]; then if [ -z "${autoinstall}" ]; then
echo "" if fn_prompt_yn "Do you want to use MariaDB instead of sqlite? (MariaDB must be pre-configured)" N; then
if fn_prompt_yn "Do you want to use MariaDB/MySQL instead of sqlite? (DB must be pre-configured)" N; then
fn_install_ts3db_mariadb fn_install_ts3db_mariadb
fi fi
else else
fn_print_warning_nl "./${selfname} auto-install is uses sqlite. For MariaDB/MySQL use ./${selfname} install" fn_print_information_nl "./${selfname} auto-install is uses sqlite. For MariaDB use ./${selfname} install"
fi fi
## License install_eula.sh
fn_script_log "Accepting ts3server license: ${executabledir}/LICENSE"
fn_print_information_nl "Accepting TeamSpeak license:"
echo " * ${executabledir}/LICENSE"
sleep 0.5
touch "${executabledir}/.ts3server_license_accepted"
## Get privilege key ## Get privilege key
echo "" echo ""
echo "Getting privilege key" echo "Getting privilege key"
echo "=================================" echo "================================="
sleep 0.5 sleep 0.5
echo "IMPORANT! Save these details for later." fn_print_information_nl "Save these details for later."
sleep 0.5 sleep 0.5
cd "${executabledir}" || exit cd "${executabledir}" || exit
./ts3server_startscript.sh start inifile=ts3-server.ini ${executable} start inifile=ts3-server.ini
sleep 5 sleep 5
./ts3server_startscript.sh stop ${executable} stop

28
lgsm/functions/install_unreal_tournament_eula.sh

@ -1,28 +0,0 @@
#!/bin/bash
# LinuxGSM install_unreal_tournament_eula.sh function
# Author: Daniel Gibbs
# Website: https://linuxgsm.com
# Description: Gets user to accept the EULA.
echo ""
echo "Accept ${gamename} EULA"
echo "================================="
sleep 0.5
echo "You are required to accept the EULA:"
echo "https://www.epicgames.com/unrealtournament/unreal-tournament-pre-alpha-test-development-build-eula/"
echo "eula=false" > "${serverfiles}/eula.txt"
if [ -z "${autoinstall}" ]; then
echo "By continuing you are indicating your agreement to the EULA."
echo ""
if ! fn_prompt_yn "Continue?" Y; then
core_exit.sh
fi
else
echo "By using auto-install you are indicating your agreement to the EULA."
echo ""
sleep 5
fi
sed -i "s/eula=false/eula=true/g" "${serverfiles}/eula.txt"

2
lgsm/functions/query_gsquery.py

@ -104,7 +104,7 @@ if __name__ == '__main__':
action='store', action='store',
dest='engine', dest='engine',
default=False, default=False,
help='Engine type: avalanche2.0, avalanche3.0, goldsource, idtech2, idtech3, iw2.0, iw3.0, minecraft, quake, quakelive, realvirtuality, refractor, spark, source, unity3d, unreal, unreal2.' help='Engine type: avalanche2.0 avalanche3.0 goldsource idtech2 idtech3 ioquake3 iw2.0 iw3.0 madness quake quakelive realvirtuality refracto source spark starbound unity3d unreal unreal2 unreal4 wurm.'
) )
parser.add_option( parser.add_option(
'-v', '--verbose', '-v', '--verbose',

2
lgsm/functions/update_factorio.sh

@ -144,7 +144,7 @@ fn_update_factorio_compare(){
} }
# The location where the builds are checked and downloaded. # The location where the builds are checked and downloaded.
remotelocation="mojang.com" remotelocation="factorio.com"
# Game server architecture. # Game server architecture.
factorioarch="linux64" factorioarch="linux64"

5
lgsm/functions/update_minecraft.sh

@ -74,16 +74,15 @@ fn_update_minecraft_localbuild(){
if [ -z "${localbuild}" ]; then if [ -z "${localbuild}" ]; then
# Gives time for var to generate. # Gives time for var to generate.
end="$(SECONDS+120)"
totalseconds=0 totalseconds=0
while [ "${SECONDS}" -lt "${end}" ]; do for seconds in {1..120}; do
fn_print_info "Checking for update: ${remotelocation}: checking local build: waiting for local build: ${totalseconds}" fn_print_info "Checking for update: ${remotelocation}: checking local build: waiting for local build: ${totalseconds}"
if [ -z "${loopignore}" ]; then if [ -z "${loopignore}" ]; then
loopignore=1 loopignore=1
fn_script_log_info "Waiting for local build to generate" fn_script_log_info "Waiting for local build to generate"
fi fi
localbuild=$(cat "${serverfiles}/logs/latest.log" 2> /dev/null | grep version | grep -Eo '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | 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}") localbuild=$(cat "${serverfiles}/logs/latest.log" 2> /dev/null | grep version | grep -Eo '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | 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 [ "${localbuild}" ]; then if [ "${localbuild}" ]||[ "${seconds}" == "120" ]; then
break break
fi fi
sleep 1 sleep 1

6
linuxgsm.sh

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Project: Game Server Managers - LinuxGSM # Project: Game Server Managers - LinuxGSM
# Author: Daniel Gibbs # Author: Daniel Gibbs
# License: MIT License, Copyright (c) 2017 Daniel Gibbs # License: MIT License, Copyright (c) 2019 Daniel Gibbs
# Purpose: Linux Game Server Management Script # Purpose: Linux Game Server Management Script
# Contributors: https://linuxgsm.com/contrib # Contributors: https://linuxgsm.com/contrib
# Documentation: https://docs.linuxgsm.com # Documentation: https://docs.linuxgsm.com
@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x set -x
fi fi
version="190301" version="190422"
shortname="core" shortname="core"
gameservername="core" gameservername="core"
rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
@ -377,4 +377,4 @@ else
getopt=$1 getopt=$1
core_getopt.sh core_getopt.sh
fi fi
fi fi

14
tests/tests_fctrserver.sh

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Project: Game Server Managers - LinuxGSM # Project: Game Server Managers - LinuxGSM
# Author: Daniel Gibbs # Author: Daniel Gibbs
# License: MIT License, Copyright (c) 2017 Daniel Gibbs # License: MIT License, Copyright (c) 2019 Daniel Gibbs
# Purpose: Travis CI Tests: Factorio | Linux Game Server Management Script # Purpose: Travis CI Tests: Factorio | Linux Game Server Management Script
# Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors
# Documentation: https://docs.linuxgsm.com/ # Documentation: https://docs.linuxgsm.com/
@ -452,6 +452,14 @@ fn_test_result_fail(){
fi fi
} }
# test result n/a
fn_test_result_na(){
echo "================================="
echo "Expected result: N/A"
echo "Actual result: N/A"
fn_print_fail_nl "TEST N/A"
}
echo "=================================" echo "================================="
echo "Travis CI Tests" echo "Travis CI Tests"
echo "Linux Game Server Manager" echo "Linux Game Server Manager"
@ -570,7 +578,7 @@ echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo "" echo ""
echo "2.0 - Instalation" echo "2.0 - Installation"
echo "==================================================================" echo "=================================================================="
echo "" echo ""
@ -986,4 +994,4 @@ requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
fn_print_info "Tidying up directories." fn_print_info "Tidying up directories."
rm -rfv "${serverfiles}" rm -rfv "${serverfiles}"
core_exit.sh core_exit.sh

14
tests/tests_jc2server.sh

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Project: Game Server Managers - LinuxGSM # Project: Game Server Managers - LinuxGSM
# Author: Daniel Gibbs # Author: Daniel Gibbs
# License: MIT License, Copyright (c) 2017 Daniel Gibbs # License: MIT License, Copyright (c) 2019 Daniel Gibbs
# Purpose: Travis CI Tests: Just Cause 2 | Linux Game Server Management Script # Purpose: Travis CI Tests: Just Cause 2 | Linux Game Server Management Script
# Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors
# Documentation: https://docs.linuxgsm.com/ # Documentation: https://docs.linuxgsm.com/
@ -578,7 +578,7 @@ echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo "" echo ""
echo "2.0 - Instalation" echo "2.0 - Installation"
echo "==================================================================" echo "=================================================================="
echo "" echo ""
@ -904,14 +904,18 @@ echo "================================="
echo "Description:" echo "Description:"
echo "Inserting Travis IP in to config." echo "Inserting Travis IP in to config."
echo "Allows monitor to work" echo "Allows monitor to work"
travisip=$(ip -o -4 addr|grep eth0|awk '{print $4}'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0) if [ "$(ip -o -4 addr|grep eth0)" ]; then
travisip=$(ip -o -4 addr | grep eth0 | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | grep -v 127.0.0)
else
travisip=$(ip -o -4 addr | grep ens | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0)
fi
sed -i "/BindIP/c\BindIP = \"${travisip}\"," "${serverfiles}/config.lua" sed -i "/BindIP/c\BindIP = \"${travisip}\"," "${serverfiles}/config.lua"
echo "IP: ${travisip}" echo "IP: ${travisip}"
echo "" echo ""
echo "5.0 - Monitor Tests" echo "5.0 - Monitor Tests"
echo "==================================================================" echo "=================================================================="
info_config.sh
echo "" echo ""
echo "Server IP - Port: ${ip}:${port}" echo "Server IP - Port: ${ip}:${port}"
echo "Server IP - Query Port: ${ip}:${queryport}" echo "Server IP - Query Port: ${ip}:${queryport}"
@ -1151,4 +1155,4 @@ requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
fn_print_info "Tidying up directories." fn_print_info "Tidying up directories."
rm -rfv "${serverfiles}" rm -rfv "${serverfiles}"
core_exit.sh core_exit.sh

1043
tests/tests_mcserver.sh

File diff suppressed because it is too large

4
tests/tests_shellcheck.sh

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Project: Game Server Managers - LinuxGSM # Project: Game Server Managers - LinuxGSM
# Author: Daniel Gibbs # Author: Daniel Gibbs
# License: MIT License, Copyright (c) 2017 Daniel Gibbs # License: MIT License, Copyright (c) 2019 Daniel Gibbs
# Purpose: Travis CI Tests: Shellcheck | Linux Game Server Management Script # Purpose: Travis CI Tests: Shellcheck | Linux Game Server Management Script
# Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors
# Documentation: https://docs.linuxgsm.com/ # Documentation: https://docs.linuxgsm.com/
@ -29,4 +29,4 @@ echo ""
echo "=================================" echo "================================="
echo "Bash Analysis Tests - Complete!" echo "Bash Analysis Tests - Complete!"
echo "Using: Shellcheck" echo "Using: Shellcheck"
echo "=================================" echo "================================="

14
tests/tests_ts3server.sh

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Project: Game Server Managers - LinuxGSM # Project: Game Server Managers - LinuxGSM
# Author: Daniel Gibbs # Author: Daniel Gibbs
# License: MIT License, Copyright (c) 2017 Daniel Gibbs # License: MIT License, Copyright (c) 2019 Daniel Gibbs
# Purpose: Travis CI Tests: Teamspeak 3 | Linux Game Server Management Script # Purpose: Travis CI Tests: Teamspeak 3 | Linux Game Server Management Script
# Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors
# Documentation: https://docs.linuxgsm.com/ # Documentation: https://docs.linuxgsm.com/
@ -452,6 +452,14 @@ fn_test_result_fail(){
fi fi
} }
# test result n/a
fn_test_result_na(){
echo "================================="
echo "Expected result: N/A"
echo "Actual result: N/A"
fn_print_fail_nl "TEST N/A"
}
echo "=================================" echo "================================="
echo "Travis CI Tests" echo "Travis CI Tests"
echo "Linux Game Server Manager" echo "Linux Game Server Manager"
@ -570,7 +578,7 @@ echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo "" echo ""
echo "2.0 - Instalation" echo "2.0 - Installation"
echo "==================================================================" echo "=================================================================="
echo "" echo ""
@ -986,4 +994,4 @@ requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
fn_print_info "Tidying up directories." fn_print_info "Tidying up directories."
rm -rfv "${serverfiles}" rm -rfv "${serverfiles}"
core_exit.sh core_exit.sh

Loading…
Cancel
Save