Просмотр исходного кода

Merge pull request #2301 from GameServerManagers/release/190422

Release/190422
Daniel Gibbs 7 лет назад
Родитель
Сommit
16dea3074b
44 измененных файлов с 1683 добавлено и 196 удалено
  1. 107 0
      .all-contributorsrc
  2. 5 3
      .travis.yml
  3. 30 13
      PULL_REQUEST_TEMPLATE.md
  4. 0 0
      README.md
  5. 6 1
      lgsm/config-default/config-lgsm/bsserver/_default.cfg
  6. 135 0
      lgsm/config-default/config-lgsm/dysserver/_default.cfg
  7. 130 0
      lgsm/config-default/config-lgsm/ndserver/_default.cfg
  8. 2 0
      lgsm/data/serverlist.csv
  9. 3 2
      lgsm/functions/check_executable.sh
  10. 2 0
      lgsm/functions/command_debug.sh
  11. 15 1
      lgsm/functions/command_dev_query_raw.sh
  12. 4 4
      lgsm/functions/command_fastdl.sh
  13. 2 2
      lgsm/functions/command_install.sh
  14. 2 1
      lgsm/functions/command_monitor.sh
  15. 1 5
      lgsm/functions/command_start.sh
  16. 11 11
      lgsm/functions/core_functions.sh
  17. 1 1
      lgsm/functions/core_getopt.sh
  18. 23 22
      lgsm/functions/fix.sh
  19. 2 2
      lgsm/functions/fix_dst.sh
  20. 1 1
      lgsm/functions/fix_mta.sh
  21. 4 1
      lgsm/functions/fix_ss3.sh
  22. 4 4
      lgsm/functions/fix_steamcmd.sh
  23. 1 1
      lgsm/functions/fix_tf2.sh
  24. 5 2
      lgsm/functions/fix_ts3.sh
  25. 4 4
      lgsm/functions/info_config.sh
  26. 3 0
      lgsm/functions/info_glibc.sh
  27. 3 3
      lgsm/functions/info_messages.sh
  28. 2 1
      lgsm/functions/install_complete.sh
  29. 12 0
      lgsm/functions/install_config.sh
  30. 45 0
      lgsm/functions/install_eula.sh
  31. 4 4
      lgsm/functions/install_gslt.sh
  32. 0 28
      lgsm/functions/install_minecraft_eula.sh
  33. 3 3
      lgsm/functions/install_server_files.sh
  34. 28 27
      lgsm/functions/install_ts3db.sh
  35. 0 28
      lgsm/functions/install_unreal_tournament_eula.sh
  36. 1 1
      lgsm/functions/query_gsquery.py
  37. 1 1
      lgsm/functions/update_factorio.sh
  38. 2 3
      lgsm/functions/update_minecraft.sh
  39. 3 3
      linuxgsm.sh
  40. 11 3
      tests/tests_fctrserver.sh
  41. 9 5
      tests/tests_jc2server.sh
  42. 1043 0
      tests/tests_mcserver.sh
  43. 2 2
      tests/tests_shellcheck.sh
  44. 11 3
      tests/tests_ts3server.sh

+ 107 - 0
.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"
+}

+ 5 - 3
.travis.yml

@@ -1,4 +1,4 @@
-language: bash node_js
+language: node_js
 dist: xenial
 node_js:
   - 10
@@ -40,6 +40,8 @@ jobs:
     - # stage name not required
       script: bash tests/tests_fctrserver.sh
     - # stage name not required
-      script: bash tests/tests_ts3server.sh
+      script: bash tests/tests_mcserver.sh
     - # 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

+ 30 - 13
PULL_REQUEST_TEMPLATE.md

@@ -2,22 +2,39 @@
 
 Please include a summary of the change and which issue is fixed.
 
-Fixes #\[issue]
+Fixes #[issue]
 
 ## Type of change
 
-* [ ] Bug fix (change which fixes an issue)
-* [ ] New feature (change which adds functionality)
-* [ ] New Server (new server added)
-* [ ] Refactor (restructures existing code)
-* [ ] This change requires a documentation update
+* [ ] Bug fix (change which fixes an issue).
+* [ ] New feature (change which adds functionality).
+* [ ] New Server (new server added).
+* [ ] Refactor (restructures existing code).
+* [ ] Comment update (typo, spelling, etc).
+* [ ] This change requires a documentation update.
 
 ## Checklist
 
-* [ ] My code follows the style guidelines of this project
-* [ ] This pull request links to an issue
-* [ ] This pull request uses the `develop` branch as its base 
-* [ ] I have performed a self-review of my own code
-* [ ] I have squashed commits
-* [ ] I have commented my code, particularly in hard to understand areas
-* [ ] I have made corresponding changes to the documentation if required
+* [ ] This code follows the style guidelines of this project.
+* [ ] This pull request links to an issue.
+* [ ] This pull request uses the `develop` branch as its base.
+* [ ] I have provided Co-author details below.
+* [ ] I have performed a self-review of my own code.
+* [ ] I have squashed commits.
+* [ ] 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).

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
README.md


+ 6 - 1
lgsm/config-default/config-lgsm/bsserver/_default.cfg

@@ -20,9 +20,14 @@ sourcetvport="27020"
 defaultmap="duel_winter"
 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
 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 ####

+ 135 - 0
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@example.com"
+emailfrom=""
+
+# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt
+iftttalert="off"
+ifttttoken="accesstoken"
+iftttevent="linuxgsm_alert"
+
+# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun
+mailgunalert="off"
+mailguntoken="accesstoken"
+mailgundomain="example.com"
+mailgunemailfrom="alert@example.com"
+mailgunemail="email@myemail.com"
+
+# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
+pushbulletalert="off"
+pushbullettoken="accesstoken"
+channeltag=""
+
+# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
+pushoveralert="off"
+pushovertoken="accesstoken"
+
+# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
+# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring".
+# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need
+# any custom string in curl - simple ignore this parameter.
+telegramalert="off"
+telegramtoken="accesstoken"
+telegramchatid=""
+curlcustomstring=""
+
+## Updating | https://docs.linuxgsm.com/commands/update
+updateonstart="off"
+
+## Backup | https://docs.linuxgsm.com/commands/backup
+maxbackups="4"
+maxbackupdays="30"
+stoponbackup="on"
+
+## Logging | https://docs.linuxgsm.com/features/logging
+consolelogging="on"
+logdays="7"
+
+#### 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 - 0
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@example.com"
+emailfrom=""
+
+# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt
+iftttalert="off"
+ifttttoken="accesstoken"
+iftttevent="linuxgsm_alert"
+
+# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun
+mailgunalert="off"
+mailguntoken="accesstoken"
+mailgundomain="example.com"
+mailgunemailfrom="alert@example.com"
+mailgunemail="email@myemail.com"
+
+# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
+pushbulletalert="off"
+pushbullettoken="accesstoken"
+channeltag=""
+
+# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
+pushoveralert="off"
+pushovertoken="accesstoken"
+
+# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
+# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring".
+# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need
+# any custom string in curl - simple ignore this parameter.
+telegramalert="off"
+telegramtoken="accesstoken"
+telegramchatid=""
+curlcustomstring=""
+
+## Updating | https://docs.linuxgsm.com/commands/update
+updateonstart="off"
+
+## Backup | https://docs.linuxgsm.com/commands/backup
+maxbackups="4"
+maxbackupdays="30"
+stoponbackup="on"
+
+## Logging | https://docs.linuxgsm.com/features/logging
+consolelogging="on"
+logdays="7"
+
+#### 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 - 0
lgsm/data/serverlist.csv

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

+ 3 - 2
lgsm/functions/check_executable.sh

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

+ 2 - 0
lgsm/functions/command_debug.sh

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

+ 15 - 1
lgsm/functions/command_dev_query_raw.sh

@@ -55,4 +55,18 @@ if [ "${querystatus}" == "0" ]; then
 	echo "tcp query PASS"
 else
 	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

+ 4 - 4
lgsm/functions/command_fastdl.sh

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

+ 2 - 2
lgsm/functions/command_install.sh

@@ -32,7 +32,7 @@ else
 
 	# Configuration
 	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
 	elif [ "${shortname}" == "dst" ]; then
 		install_dst_token.sh
@@ -47,4 +47,4 @@ else
 	fix.sh
 	install_complete.sh
 	core_exit.sh
-fi
+fi

+ 2 - 1
lgsm/functions/command_monitor.sh

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

+ 1 - 5
lgsm/functions/command_start.sh

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

+ 11 - 11
lgsm/functions/core_functions.sh

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

+ 1 - 1
lgsm/functions/core_getopt.sh

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

+ 23 - 22
lgsm/functions/fix.sh

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

+ 2 - 2
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)
 # 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
-	fixname="libcurl-gnutls.so.4 missing"
+	fixname="libcurl-gnutls.so.4"
 	fn_fix_msg_start
 	ln -s "/usr/lib/libcurl.so.4" "${serverfiles}/bin/lib32/libcurl-gnutls.so.4"
 	fn_fix_msg_end
-fi
+fi

+ 1 - 1
lgsm/functions/fix_mta.sh

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

+ 4 - 1
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/
 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"
-fi
+	fn_fix_msg_end
+fi

+ 4 - 4
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.
 if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then
-	fixname="steamclient.so general"
+	fixname="steamclient.so"
 	fn_fix_msg_start
 	mkdir -pv "${HOME}/.steam/sdk32" >> "${lgsmlog}"
 	cp -v "${steamcmddir}/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${lgsmlog}"
@@ -23,7 +23,7 @@ if [ "${shortname}" == "ss3" ]; then
 		fixname="libsteam.so"
 		fn_fix_msg_start
 		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
 	fi
 elif [ "${shortname}" == "hw" ]; then
@@ -31,13 +31,13 @@ elif [ "${shortname}" == "hw" ]; then
 	if [ ! -f "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" ]; then
 		fixname="steamclient.so x86"
 		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
 	fi
 	if [ ! -f "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" ]; then
 		fixname="steamclient.so x86_64"
 		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
 	fi
 elif [ "${shortname}" == "tu" ]; then

+ 1 - 1
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.
 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
 	ln -s "/usr/lib/libcurl.so.4" "${serverfiles}/bin/libcurl-gnutls.so.4"
 	fn_fix_msg_end

+ 5 - 2
lgsm/functions/fix_ts3.sh

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

+ 4 - 4
lgsm/functions/info_config.sh

@@ -320,6 +320,7 @@ fn_info_config_inss(){
 		rconport=${rconport:-"0"}
 	fi
 }
+
 fn_info_config_minecraft(){
 	if [ ! -f "${servercfgfullpath}" ]; then
 		servername="${unavailable}"
@@ -329,7 +330,6 @@ fn_info_config_minecraft(){
 		port="${zero}"
 		queryport="${zero}"
 		queryenabled="${unavailable}"
-		rconport="${zero}"
 		gamemode="${unavailable}"
 		gameworld="${unavailable}"
 	else
@@ -338,9 +338,8 @@ fn_info_config_minecraft(){
 		rconport=$(grep "rcon.port" "${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:]')
-		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]*$//')
-		rconport=$(grep "rcon.port" "${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]*$//')
 
@@ -354,9 +353,10 @@ fn_info_config_minecraft(){
 		rconport=${rconport:-"NOT SET"}
 		maxplayers=${maxplayers:-"NOT SET"}
 		port=${port:-"NOT SET"}
+		queryport="${queryport:-"NOT SET"}"
+		queryenabled="${queryenabled:-"NOT SET"}"
 		gamemode=${gamemode:-"NOT SET"}
 		gameworld=${gameworld:-"NOT SET"}
-
 	fi
 }
 

+ 3 - 0
lgsm/functions/info_glibc.sh

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

+ 3 - 3
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 Cores:\t${default}${cpucores}"
 		echo -e "${blue}CPU Frequency:\t${default}${cpufreuency}"
-	} | column -s $'\t' -t	
+	} | column -s $'\t' -t
 	echo -e ""
 	{
 		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 "> Game\tINBOUND\t${port}\ttcp"
-		echo -e "> Game\tINBOUND\t${queryport}\tudp"
-		echo -e "> Game\tINBOUND\t${rconport}\ttcp"
+		echo -e "> Query\tINBOUND\t${queryport}\tudp"
+		echo -e "> Rcon\tINBOUND\t${rconport}\ttcp"
 	} | column -s $'\t' -t
 }
 

+ 2 - 1
lgsm/functions/install_complete.sh

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

+ 12 - 0
lgsm/functions/install_config.sh

@@ -313,6 +313,12 @@ elif [ "${gamename}" == "Double Action: Boogaloo" ]; then
 	fn_fetch_default_config
 	fn_default_config_remote
 	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
 	gamedirname="ETLegacy"
 	array_configs+=( server.cfg )
@@ -433,6 +439,12 @@ elif [ "${gamename}" == "No More Room in Hell" ]; then
 	fn_fetch_default_config
 	fn_default_config_remote
 	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
 	gamedirname="MultiTheftAuto"
 	fn_check_cfgdir

+ 45 - 0
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

+ 4 - 4
lgsm/functions/install_gslt.sh

@@ -12,7 +12,7 @@ echo ""
 echo "Game Server Login Token"
 echo "================================="
 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"
 	fn_script_log_info "GSLT is required to run a public ${gamename} server"
 else
@@ -26,7 +26,7 @@ fn_script_log_info "Get more info and a token here:"
 fn_script_log_info "https://linuxgsm.com/gslt"
 echo ""
 if [ -z "${autoinstall}" ]; then
-	if [ "${gamename}" != "Tower Unite" ]; then
+	if [ "${shortname}" != "tu" ]; then
 		echo "Enter token below (Can be blank)."
 		echo -n "GSLT TOKEN: "
 		read -r token
@@ -38,11 +38,11 @@ if [ -z "${autoinstall}" ]; then
 	fi
 fi
 sleep 0.5
-if [ "${gamename}" == "Tower Unite" ]; then
+if [ "${shortname}" == "tu" ]; then
 	echo "The GSLT can be changed by editing ${servercfgdir}/${servercfg}."
 	fn_script_log_info "The GSLT can be changed by editing ${servercfgdir}/${servercfg}."
 else
 	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."
 fi
-echo ""
+echo ""

+ 0 - 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"

+ 3 - 3
lgsm/functions/install_server_files.sh

@@ -36,7 +36,7 @@ fn_install_server_files(){
 	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"
 	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
 		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
@@ -137,7 +137,7 @@ fi
 if [ "${shortname}" == "ts3" ]; then
 	update_ts3.sh
 elif [ "${shortname}" == "mc" ]; then
-	install_minecraft_eula.sh
+	install_eula.sh
 	update_minecraft.sh
 elif [ "${shortname}" == "mumble" ]; then
 	update_mumble.sh
@@ -148,7 +148,7 @@ elif [ "${shortname}" == "fctr" ]; then
 	install_factorio_save.sh
 elif [ -z "${appid}" ]||[ "${shortname}" == "ges" ]||[ "${shortname}" == "bd" ]||[ "${shortname}" == "bb" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "vs" ]; then
 	if [ "${shortname}" == "ut" ]; then
-		install_unreal_tournament_eula.sh
+		install_eula.sh
 	fi
 	fn_install_server_files
 fi

+ 28 - 27
lgsm/functions/install_ts3db.sh

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

+ 0 - 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"

+ 1 - 1
lgsm/functions/query_gsquery.py

@@ -104,7 +104,7 @@ if __name__ == '__main__':
         action='store',
         dest='engine',
         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(
         '-v', '--verbose',

+ 1 - 1
lgsm/functions/update_factorio.sh

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

+ 2 - 3
lgsm/functions/update_minecraft.sh

@@ -74,16 +74,15 @@ fn_update_minecraft_localbuild(){
 
 	if [ -z "${localbuild}" ]; then
 		# Gives time for var to generate.
-		end="$(SECONDS+120)"
 		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}"
 			if [ -z "${loopignore}" ]; then
 				loopignore=1
 				fn_script_log_info "Waiting for local build to generate"
 			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}")
-			if [ "${localbuild}" ]; then
+			if [ "${localbuild}" ]||[ "${seconds}" == "120" ]; then
 				break
 			fi
 			sleep 1

+ 3 - 3
linuxgsm.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 # Project: Game Server Managers - LinuxGSM
 # 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
 # Contributors: https://linuxgsm.com/contrib
 # Documentation: https://docs.linuxgsm.com
@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="190301"
+version="190422"
 shortname="core"
 gameservername="core"
 rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
@@ -377,4 +377,4 @@ else
 		getopt=$1
 		core_getopt.sh
 	fi
-fi
+fi

+ 11 - 3
tests/tests_fctrserver.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 # Project: Game Server Managers - LinuxGSM
 # 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
 # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors
 # Documentation: https://docs.linuxgsm.com/
@@ -452,6 +452,14 @@ fn_test_result_fail(){
 	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 "Travis CI Tests"
 echo "Linux Game Server Manager"
@@ -570,7 +578,7 @@ echo "================="
 grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
 
 echo ""
-echo "2.0 - Instalation"
+echo "2.0 - Installation"
 echo "=================================================================="
 
 echo ""
@@ -986,4 +994,4 @@ requiredstatus="OFFLINE"
 fn_setstatus
 fn_print_info "Tidying up directories."
 rm -rfv "${serverfiles}"
-core_exit.sh
+core_exit.sh

+ 9 - 5
tests/tests_jc2server.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 # Project: Game Server Managers - LinuxGSM
 # 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
 # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors
 # Documentation: https://docs.linuxgsm.com/
@@ -578,7 +578,7 @@ echo "================="
 grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
 
 echo ""
-echo "2.0 - Instalation"
+echo "2.0 - Installation"
 echo "=================================================================="
 
 echo ""
@@ -904,14 +904,18 @@ echo "================================="
 echo "Description:"
 echo "Inserting Travis IP in to config."
 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"
 echo "IP: ${travisip}"
 
 echo ""
 echo "5.0 - Monitor Tests"
 echo "=================================================================="
-
+info_config.sh
 echo ""
 echo "Server IP - Port: ${ip}:${port}"
 echo "Server IP - Query Port: ${ip}:${queryport}"
@@ -1151,4 +1155,4 @@ requiredstatus="OFFLINE"
 fn_setstatus
 fn_print_info "Tidying up directories."
 rm -rfv "${serverfiles}"
-core_exit.sh
+core_exit.sh

+ 1043 - 0
tests/tests_mcserver.sh

@@ -0,0 +1,1043 @@
+#!/bin/bash
+# Project: Game Server Managers - LinuxGSM
+# Author: Daniel Gibbs
+# License: MIT License, Copyright (c) 2019 Daniel Gibbs
+# Purpose: Travis CI Tests: Factorio | Linux Game Server Management Script
+# Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors
+# Documentation: https://docs.linuxgsm.com/
+# Website: https://linuxgsm.com
+travistest="1"
+version="190401"
+shortname="mc"
+gameservername="mcserver"
+rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
+selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+servicename="${gameservername}"
+lockselfname=".${servicename}.lock"
+lgsmdir="${rootdir}/lgsm"
+logdir="${rootdir}/log"
+lgsmlogdir="${logdir}/lgsm"
+steamcmddir="${rootdir}/steamcmd"
+serverfiles="${rootdir}/serverfiles"
+functionsdir="${lgsmdir}/functions"
+libdir="${lgsmdir}/lib"
+tmpdir="${lgsmdir}/tmp"
+configdir="${lgsmdir}/config-lgsm"
+configdirserver="${configdir}/${gameservername}"
+configdirdefault="${lgsmdir}/config-default"
+
+# Allows for testing not on Travis CI
+if [ ! -v TRAVIS ]; then
+	TRAVIS_BRANCH="develop"
+	TRAVIS_BUILD_DIR="${rootdir}"
+fi
+
+## GitHub Branch Select
+# Allows for the use of different function files
+# from a different repo and/or branch.
+githubuser="GameServerManagers"
+githubrepo="LinuxGSM"
+githubbranch="${TRAVIS_BRANCH}"
+
+# Core Function that is required first
+core_functions.sh(){
+	functionfile="${FUNCNAME}"
+	fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5"
+}
+
+# Bootstrap
+# Fetches the core functions required before passed off to core_dl.sh
+
+# Fetches core functions
+fn_bootstrap_fetch_file(){
+	remote_fileurl="${1}"
+	local_filedir="${2}"
+	local_filename="${3}"
+	chmodx="${4:-0}"
+	run="${5:-0}"
+	forcedl="${6:-0}"
+	md5="${7:-0}"
+	# download file if missing or download forced
+	if [ ! -f "${local_filedir}/${local_filename}" ]||[ "${forcedl}" == "forcedl" ]; then
+		if [ ! -d "${local_filedir}" ]; then
+			mkdir -p "${local_filedir}"
+		fi
+		# Defines curl path
+		curlpath=$(command -v curl 2>/dev/null)
+
+		# If curl exists download file
+		if [ "$(basename "${curlpath}")" == "curl" ]; then
+			# trap to remove part downloaded files
+			echo -en "    fetching ${local_filename}...\c"
+			curlcmd=$(${curlpath} -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1)
+			local exitcode=$?
+			if [ ${exitcode} -ne 0 ]; then
+				echo -e "\e[0;31mFAIL\e[0m\n"
+				if [ -f "${lgsmlog}" ]; then
+					echo -e "${remote_fileurl}" | tee -a "${lgsmlog}"
+					echo "${curlcmd}" | tee -a "${lgsmlog}"
+				fi
+				exit 1
+			else
+				echo -e "\e[0;32mOK\e[0m"
+			fi
+		else
+			echo "[ FAIL ] Curl is not installed"
+			exit 1
+		fi
+		# make file chmodx if chmodx is set
+		if [ "${chmodx}" == "chmodx" ]; then
+			chmod +x "${local_filedir}/${local_filename}"
+		fi
+	fi
+
+	if [ -f "${local_filedir}/${local_filename}" ]; then
+		# run file if run is set
+		if [ "${run}" == "run" ]; then
+			source "${local_filedir}/${local_filename}"
+		fi
+	fi
+}
+
+fn_bootstrap_fetch_file_github(){
+	github_file_url_dir="${1}"
+	github_file_url_name="${2}"
+	githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
+
+	remote_fileurl="${githuburl}"
+	local_filedir="${3}"
+	local_filename="${github_file_url_name}"
+	chmodx="${4:-0}"
+	run="${5:-0}"
+	forcedl="${6:-0}"
+	md5="${7:-0}"
+	# Passes vars to the file download function
+	fn_bootstrap_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}"
+}
+
+# Installer menu
+
+fn_print_center() {
+	columns="$(tput cols)"
+	line="$@"
+	printf "%*s\n" $(( (${#line} + columns) / 2)) "${line}"
+}
+
+fn_print_horizontal(){
+	char="${1:-=}"
+	printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "${char}"
+}
+
+# Bash Menu
+fn_install_menu_bash() {
+	local resultvar=$1
+	title=$2
+	caption=$3
+	options=$4
+	fn_print_horizontal
+	fn_print_center "${title}"
+	fn_print_center "${caption}"
+	fn_print_horizontal
+	menu_options=()
+	while read -r line || [[ -n "${line}" ]]; do
+		var=$(echo "${line}" | awk -F "," '{print $2 " - " $3}')
+		menu_options+=( "${var}" )
+	done <  ${options}
+	menu_options+=( "Cancel" )
+	select option in "${menu_options[@]}"; do
+		if [ -n "${option}" ]&&[ "${option}" != "Cancel" ]; then
+			eval "$resultvar=\"${option/%\ */}\""
+		fi
+		break
+	done
+}
+
+# Whiptail/Dialog Menu
+fn_install_menu_whiptail() {
+	local menucmd=$1
+	local resultvar=$2
+	title=$3
+	caption=$4
+	options=$5
+	height=${6:-40}
+	width=${7:-80}
+	menuheight=${8:-30}
+	IFS=","
+	menu_options=()
+	while read -r line; do
+		key=$(echo "${line}" | awk -F "," '{print $3}')
+		val=$(echo "${line}" | awk -F "," '{print $2}')
+		menu_options+=( ${val//\"} "${key//\"}" )
+	done < "${options}"
+	OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3)
+	if [ $? == 0 ]; then
+		eval "$resultvar=\"${OPTION}\""
+	else
+		eval "$resultvar="
+	fi
+}
+
+# Menu selector
+fn_install_menu() {
+	local resultvar=$1
+	local selection=""
+	title=$2
+	caption=$3
+	options=$4
+	# Get menu command
+	for menucmd in whiptail dialog bash; do
+		if [ -x "$(command -v "${menucmd}")" ]; then
+			menucmd=$(command -v "${menucmd}")
+			break
+		fi
+	done
+	case "$(basename "${menucmd}")" in
+		whiptail|dialog)
+			fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30;;
+		*)
+			fn_install_menu_bash selection "${title}" "${caption}" "${options}";;
+	esac
+	eval "$resultvar=\"${selection}\""
+}
+
+# Gets server info from serverlist.csv and puts in to array
+fn_server_info(){
+	IFS=","
+	server_info_array=($(grep -aw "${userinput}" "${serverlist}"))
+	shortname="${server_info_array[0]}" # csgo
+	gameservername="${server_info_array[1]}" # csgoserver
+	gamename="${server_info_array[2]}" # Counter Strike: Global Offensive
+}
+
+fn_install_getopt(){
+	userinput="empty"
+	echo "Usage: $0 [option]"
+	echo -e ""
+	echo "Installer - Linux Game Server Managers - Version ${version}"
+	echo "https://linuxgsm.com"
+	echo -e ""
+	echo -e "Commands"
+	echo -e "install\t\t| Select server to install."
+	echo -e "servername\t| e.g $0 csgoserver. Enter name of server/game to install."
+	echo -e "list\t\t| List all servers available for install."
+	exit
+}
+
+fn_install_file(){
+	local_filename="${gameservername}"
+	if [ -e "${local_filename}" ]; then
+		i=2
+	while [ -e "${local_filename}-${i}" ] ; do
+		let i++
+	done
+		local_filename="${local_filename}-${i}"
+	fi
+	cp -R "${selfname}" "${local_filename}"
+	sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${local_filename}"
+	sed -i -e "s/gameservername=\"core\"/gameservername=\"${gameservername}\"/g" "${local_filename}"
+	echo "Installed ${gamename} server as ${local_filename}"
+	echo ""
+	if [ ! -d "${serverfiles}" ]; then
+		echo "./${local_filename} install"
+	else
+		echo "Remember to check server ports"
+		echo "./${local_filename} details"
+	fi
+	echo ""
+	exit
+}
+
+# Prevent from running this script as root.
+if [ "$(whoami)" == "root" ]; then
+	if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]; then
+		echo "[ FAIL ] Do NOT run this script as root!"
+		exit 1
+	else
+		core_functions.sh
+		check_root.sh
+	fi
+fi
+
+# LinuxGSM installer mode
+if [ "${shortname}" == "core" ]; then
+	userinput=$1
+	datadir="${tmpdir}/data"
+	serverlist="${datadir}/serverlist.csv"
+
+	# Download the latest serverlist. This is the complete list of all supported servers.
+	fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
+	if [ ! -f "${serverlist}" ]; then
+		echo "[ FAIL ] serverlist.csv could not be loaded."
+		exit 1
+	fi
+
+	if [ "${userinput}" == "list" ]; then
+		{
+			awk -F "," '{print $2 "\t" $3}' "${serverlist}"
+		} | column -s $'\t' -t | more
+		exit
+	elif [ "${userinput}" == "install" ]||[ "${userinput}" == "i" ]; then
+		fn_install_menu result "LinuxGSM" "Select game to install" "${serverlist}"
+		userinput="${result}"
+		fn_server_info
+		if [ "${result}" == "${gameservername}" ]; then
+			fn_install_file
+		elif [ "${result}" == "" ]; then
+			echo "Install canceled"
+		else
+			echo "[ FAIL ] menu result does not match gameservername"
+			echo "result: ${result}"
+			echo "gameservername: ${gameservername}"
+		fi
+	elif [ -n "${userinput}" ]; then
+		fn_server_info
+		if [ "${userinput}" == "${gameservername}" ]||[ "${userinput}" == "${gamename}" ]||[ "${userinput}" == "${shortname}" ]; then
+			fn_install_file
+		else
+			echo "[ FAIL ] unknown game server"
+		fi
+	else
+		fn_install_getopt
+	fi
+
+# LinuxGSM Server Mode
+else
+	core_functions.sh
+
+	# Load LinuxGSM configs
+	# These are required to get all the default variables for the specific server.
+	# Load the default config. If missing download it. If changed reload it.
+	if [ ! -f "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" ]; then
+		mkdir -p "${configdirdefault}/config-lgsm/${gameservername}"
+		fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
+	fi
+	if [ ! -f "${configdirserver}/_default.cfg" ]; then
+		mkdir -p "${configdirserver}"
+		echo -en "    copying _default.cfg...\c"
+		cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg"
+		exitcode=$?
+		if [ ${exitcode} -ne 0 ]; then
+			echo -e "\e[0;31mFAIL\e[0m\n"
+			exit 1
+		else
+			echo -e "\e[0;32mOK\e[0m"
+		fi
+	else
+		function_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg")
+		if [ "${function_file_diff}" != "" ]; then
+			fn_print_warn_nl "_default.cfg has been altered. reloading config."
+			echo -en "    copying _default.cfg...\c"
+			cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg"
+			exitcode=$?
+			if [ ${exitcode} -ne 0 ]; then
+				echo -e "\e[0;31mFAIL\e[0m\n"
+				exit 1
+			else
+				echo -e "\e[0;32mOK\e[0m"
+			fi
+		fi
+	fi
+	source "${configdirserver}/_default.cfg"
+	# Load the common.cfg config. If missing download it
+	if [ ! -f "${configdirserver}/common.cfg" ]; then
+		fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5"
+		source "${configdirserver}/common.cfg"
+	else
+		source "${configdirserver}/common.cfg"
+	fi
+	# Load the instance.cfg config. If missing download it
+	if [ ! -f "${configdirserver}/${servicename}.cfg" ]; then
+		fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${servicename}.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
+		source "${configdirserver}/${servicename}.cfg"
+	else
+		source "${configdirserver}/${servicename}.cfg"
+	fi
+	# Load the linuxgsm.sh in to tmpdir. If missing download it
+	if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then
+		fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5"
+	fi
+
+	# Prevents running of core_exit.sh for Travis.
+	if [ -z "${travistest}" ]; then
+		getopt=$1
+		core_getopt.sh
+	fi
+fi
+
+fn_currentstatus_tmux(){
+	check_status.sh
+	if [ "${status}" != "0" ]; then
+		currentstatus="ONLINE"
+	else
+		currentstatus="OFFLINE"
+	fi
+}
+
+fn_currentstatus_ts3(){
+	check_status.sh
+	if [ "${status}" != "0" ]; then
+		currentstatus="ONLINE"
+	else
+		currentstatus="OFFLINE"
+	fi
+}
+
+fn_setstatus(){
+	fn_currentstatus_tmux
+	echo""
+	echo "Required status: ${requiredstatus}"
+	counter=0
+	echo "Current status:  ${currentstatus}"
+	while [  "${requiredstatus}" != "${currentstatus}" ]; do
+		counter=$((counter+1))
+		fn_currentstatus_tmux
+		echo -en "New status:  ${currentstatus}\\r"
+
+		if [ "${requiredstatus}" == "ONLINE" ]; then
+			(command_start.sh > /dev/null 2>&1)
+		else
+			(command_stop.sh > /dev/null 2>&1)
+		fi
+		if [ "${counter}" -gt "5" ]; then
+			currentstatus="FAIL"
+			echo "Current status:  ${currentstatus}"
+			echo ""
+			echo "Unable to start or stop server."
+			exit 1
+		fi
+	done
+	echo -en "New status:  ${currentstatus}\\r"
+	echo -e "\n"
+	echo "Test starting:"
+	echo ""
+	sleep 0.5
+}
+
+# End of every test will expect the result to either pass or fail
+# If the script does not do as intended the whole test will fail
+# if expecting a pass
+fn_test_result_pass(){
+	if [ $? != 0 ]; then
+		echo "================================="
+		echo "Expected result: PASS"
+		echo "Actual result: FAIL"
+		fn_print_fail_nl "TEST FAILED"
+		exitcode=1
+		core_exit.sh
+	else
+		echo "================================="
+		echo "Expected result: PASS"
+		echo "Actual result: PASS"
+		fn_print_ok_nl "TEST PASSED"
+		echo ""
+	fi
+}
+
+# if expecting a fail
+fn_test_result_fail(){
+	if [ $? == 0 ]; then
+		echo "================================="
+		echo "Expected result: FAIL"
+		echo "Actual result: PASS"
+		fn_print_fail_nl "TEST FAILED"
+		exitcode=1
+		core_exit.sh
+	else
+		echo "================================="
+		echo "Expected result: FAIL"
+		echo "Actual result: FAIL"
+		fn_print_ok_nl "TEST PASSED"
+		echo ""
+	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 "Travis CI Tests"
+echo "Linux Game Server Manager"
+echo "by Daniel Gibbs"
+echo "Contributors: http://goo.gl/qLmitD"
+echo "https://linuxgsm.com"
+echo "================================="
+echo ""
+echo "================================="
+echo "Server Tests"
+echo "Using: ${gamename}"
+echo "Testing Branch: $TRAVIS_BRANCH"
+echo "================================="
+
+echo ""
+echo "0.0 - Pre-test Tasks"
+echo "=================================================================="
+echo "Description:"
+echo "Create log dir's"
+echo ""
+
+echo ""
+echo "0.1 - Create log dir's"
+echo "================================="
+echo ""
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	install_logs.sh
+)
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "0.2 - Enable dev-debug"
+echo "================================="
+echo "Description:"
+echo "Enable dev-debug"
+echo ""
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_dev_debug.sh
+)
+fn_test_result_pass
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "1.0 - Pre-install tests"
+echo "=================================================================="
+echo ""
+
+echo "1.1 - start - no files"
+echo "================================="
+echo "Description:"
+echo "test script reaction to missing server files."
+echo "Command: ./${gameservername} start"
+echo ""
+# Allows for testing not on Travis CI
+if [ ! -v TRAVIS ]; then
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_start.sh
+)
+fn_test_result_fail
+else
+	echo "Test bypassed"
+fi
+
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "1.2 - getopt"
+echo "================================="
+echo "Description:"
+echo "displaying options messages."
+echo "Command: ./${gameservername}"
+echo ""
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	core_getopt.sh
+)
+fn_test_result_pass
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "1.3 - getopt with incorrect args"
+echo "================================="
+echo "Description:"
+echo "displaying options messages."
+echo "Command: ./${gameservername} abc123"
+echo ""
+getopt="abc123"
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	core_getopt.sh
+)
+fn_test_result_fail
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "2.0 - Installation"
+echo "=================================================================="
+
+echo ""
+echo "2.0 - install"
+echo "================================="
+echo "Description:"
+echo "install ${gamename} server."
+echo "Command: ./${gameservername} auto-install"
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	fn_autoinstall
+)
+fn_test_result_pass
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "3.0 - Start/Stop/Restart Tests"
+echo "=================================================================="
+
+echo ""
+echo "3.1 - start"
+echo "================================="
+echo "Description:"
+echo "start ${gamename} server."
+echo "Command: ./${gameservername} start"
+requiredstatus="OFFLINE"
+fn_setstatus
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_start.sh
+)
+fn_test_result_pass
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "3.2 - start - online"
+echo "================================="
+echo "Description:"
+echo "start ${gamename} server while already running."
+echo "Command: ./${gameservername} start"
+requiredstatus="ONLINE"
+fn_setstatus
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_start.sh
+)
+fn_test_result_fail
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "3.3 - start - updateonstart"
+echo "================================="
+echo "Description:"
+echo "will update server on start."
+echo "Command: ./${gameservername} start"
+requiredstatus="OFFLINE"
+fn_setstatus
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	updateonstart="on";command_start.sh
+)
+fn_test_result_pass
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+echo ""
+echo "30s Pause"
+echo "================================="
+echo "Description:"
+echo "give time for server to fully start."
+echo "Command: sleep 30"
+requiredstatus="ONLINE"
+fn_setstatus
+sleep 30
+
+echo ""
+echo "3.4 - stop"
+echo "================================="
+echo "Description:"
+echo "stop ${gamename} server."
+echo "Command: ./${gameservername} stop"
+requiredstatus="ONLINE"
+fn_setstatus
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_stop.sh
+)
+fn_test_result_pass
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "3.5 - stop - offline"
+echo "================================="
+echo "Description:"
+echo "stop ${gamename} server while already stopped."
+echo "Command: ./${gameservername} stop"
+requiredstatus="OFFLINE"
+fn_setstatus
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_stop.sh
+)
+fn_test_result_fail
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "3.6 - restart"
+echo "================================="
+echo "Description:"
+echo "restart ${gamename}."
+echo "Command: ./${gameservername} restart"
+requiredstatus="ONLINE"
+fn_setstatus
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_restart.sh
+)
+fn_test_result_pass
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "3.7 - restart - offline"
+echo "================================="
+echo "Description:"
+echo "restart ${gamename} while already stopped."
+echo "Command: ./${gameservername} restart"
+requiredstatus="OFFLINE"
+fn_setstatus
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_restart.sh
+)
+fn_test_result_pass
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "4.0 - Update Tests"
+echo "=================================================================="
+
+echo ""
+echo "4.1 - update"
+echo "================================="
+echo "Description:"
+echo "check for updates."
+echo "Command: ./${gameservername} update"
+requiredstatus="OFFLINE"
+fn_setstatus
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_update.sh
+)
+fn_test_result_pass
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "Inserting IP address"
+echo "================================="
+echo "Description:"
+echo "Inserting Travis IP in to config."
+echo "Allows monitor to work"
+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 "/server-ip=/c\server-ip=${travisip}" "${serverfiles}/server.properties"
+echo "IP: ${travisip}"
+
+echo ""
+echo "5.0 - Monitor Tests"
+echo "=================================================================="
+info_config.sh
+echo ""
+echo "Server IP - Port: ${ip}:${port}"
+echo "Server IP - Query Port: ${ip}:${queryport}"
+
+echo ""
+echo "30s Pause"
+echo "================================="
+echo "Description:"
+echo "give time for server to fully start."
+echo "Command: sleep 30"
+requiredstatus="ONLINE"
+fn_setstatus
+sleep 60
+
+echo ""
+echo "5.1 - monitor - online"
+echo "================================="
+echo "Description:"
+echo "run monitor server while already running."
+echo "Command: ./${gameservername} monitor"
+requiredstatus="ONLINE"
+fn_setstatus
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_monitor.sh
+)
+fn_test_result_pass
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "5.2 - monitor - offline - with lockfile"
+echo "================================="
+echo "Description:"
+echo "run monitor while server is offline with lockfile."
+echo "Command: ./${gameservername} monitor"
+requiredstatus="OFFLINE"
+fn_setstatus
+fn_print_info_nl "creating lockfile."
+date > "${rootdir}/${lockselfname}"
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_monitor.sh
+)
+fn_test_result_pass
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "5.3 - monitor - offline - no lockfile"
+echo "================================="
+echo "Description:"
+echo "run monitor while server is offline with no lockfile."
+echo "Command: ./${gameservername} monitor"
+requiredstatus="OFFLINE"
+fn_setstatus
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_monitor.sh
+)
+fn_test_result_fail
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "5.4 - test-alert"
+echo "================================="
+echo "Description:"
+echo "run monitor while server is offline with no lockfile."
+echo "Command: ./${gameservername} test-alert"
+requiredstatus="OFFLINE"
+fn_setstatus
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_test_alert.sh
+)
+fn_test_result_fail
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "6.0 - Details Tests"
+echo "=================================================================="
+
+echo ""
+echo "6.1 - details"
+echo "================================="
+echo "Description:"
+echo "display details."
+echo "Command: ./${gameservername} details"
+requiredstatus="ONLINE"
+fn_setstatus
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_details.sh
+)
+fn_test_result_pass
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "6.2 - postdetails"
+echo "================================="
+echo "Description:"
+echo "post details."
+echo "Command: ./${gameservername} postdetails"
+requiredstatus="ONLINE"
+fn_setstatus
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_postdetails.sh
+)
+fn_test_result_pass
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "7.0 - Backup Tests"
+echo "=================================================================="
+
+echo ""
+echo "7.1 - backup"
+echo "================================="
+echo "Description:"
+echo "run a backup."
+echo "Command: ./${gameservername} backup"
+requiredstatus="ONLINE"
+fn_setstatus
+echo "test de-activated until issue #1839 fixed"
+#(command_backup.sh)
+fn_test_result_pass
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "8.0 - Development Tools Tests"
+echo "=================================================================="
+
+echo ""
+echo "8.1 - dev - detect glibc"
+echo "================================="
+echo "Description:"
+echo "detect glibc."
+echo "Command: ./${gameservername} detect-glibc"
+requiredstatus="ONLINE"
+fn_setstatus
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_dev_detect_glibc.sh
+)
+fn_test_result_pass
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "8.2 - dev - detect ldd"
+echo "================================="
+echo "Description:"
+echo "detect ldd."
+echo "Command: ./${gameservername} detect-ldd"
+requiredstatus="ONLINE"
+fn_setstatus
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_dev_detect_ldd.sh
+)
+fn_test_result_pass
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "8.3 - dev - detect deps"
+echo "================================="
+echo "Description:"
+echo "detect dependencies."
+echo "Command: ./${gameservername} detect-deps"
+requiredstatus="ONLINE"
+fn_setstatus
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_dev_detect_deps.sh
+)
+fn_test_result_pass
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "Inserting IP address"
+echo "================================="
+echo "Description:"
+echo "Inserting Travis IP in to config."
+echo "Allows monitor to work"
+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 "/server-ip=/c\server-ip=${travisip}" "${serverfiles}/server.properties"
+echo "IP: ${travisip}"
+
+echo ""
+echo "8.4 - dev - query-raw"
+echo "================================="
+echo "Description:"
+echo "raw query output."
+echo "Command: ./${gameservername} query-raw"
+requiredstatus="ONLINE"
+fn_setstatus
+(
+	exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
+	BASH_XTRACEFD="5"
+	set -x
+	command_dev_query_raw.sh
+)
+fn_test_result_na
+echo "run order"
+echo "================="
+grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+
+echo ""
+echo "================================="
+echo "Server Tests - Complete!"
+echo "Using: ${gamename}"
+echo "================================="
+requiredstatus="OFFLINE"
+fn_setstatus
+fn_print_info "Tidying up directories."
+rm -rfv "${serverfiles}"
+core_exit.sh

+ 2 - 2
tests/tests_shellcheck.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 # Project: Game Server Managers - LinuxGSM
 # 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
 # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors
 # Documentation: https://docs.linuxgsm.com/
@@ -29,4 +29,4 @@ echo ""
 echo "================================="
 echo "Bash Analysis Tests - Complete!"
 echo "Using: Shellcheck"
-echo "================================="
+echo "================================="

+ 11 - 3
tests/tests_ts3server.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 # Project: Game Server Managers - LinuxGSM
 # 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
 # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors
 # Documentation: https://docs.linuxgsm.com/
@@ -452,6 +452,14 @@ fn_test_result_fail(){
 	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 "Travis CI Tests"
 echo "Linux Game Server Manager"
@@ -570,7 +578,7 @@ echo "================="
 grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
 
 echo ""
-echo "2.0 - Instalation"
+echo "2.0 - Installation"
 echo "=================================================================="
 
 echo ""
@@ -986,4 +994,4 @@ requiredstatus="OFFLINE"
 fn_setstatus
 fn_print_info "Tidying up directories."
 rm -rfv "${serverfiles}"
-core_exit.sh
+core_exit.sh

Некоторые файлы не были показаны из-за большого количества измененных файлов