Explorar o código

Merge pull request #368 from dgibbs64/master

Update Development Branch
Daniel Gibbs %!s(int64=11) %!d(string=hai) anos
pai
achega
f84b8839ed
Modificáronse 88 ficheiros con 572 adicións e 239 borrados
  1. 142 3
      .travis.yml
  2. 3 3
      7DaysToDie/sdtdserver
  3. 7 4
      Arma3/arma3server
  4. 3 3
      BladeSymphony/bsserver
  5. 3 3
      CounterStrike/csserver
  6. 3 3
      CounterStrikeConditionZero/csczserver
  7. 3 3
      CounterStrikeGlobalOffensive/csgoserver
  8. 3 3
      CounterStrikeSource/cssserver
  9. 3 3
      DayOfDefeat/dodserver
  10. 3 3
      DayOfDefeatSource/dodsserver
  11. 2 2
      DeathmatchClassic/dmcserver
  12. 2 2
      DoubleActionBoogaloo/dabserver
  13. 3 3
      FistfulOfFrags/fofserver
  14. 2 2
      GameServerQuery/gsquery.py
  15. 3 3
      GarrysMod/gmodserver
  16. 3 3
      HalfLife2Deathmatch/hl2dmserver
  17. 2 2
      HalfLifeDeathmatch/hldmserver
  18. 15 0
      HalfLifeDeathmatchSource/cfg/lgsm-default.cfg
  19. 98 0
      HalfLifeDeathmatchSource/hldmsserver
  20. 3 3
      Insurgency/insserver
  21. 3 3
      JustCause2/jc2server
  22. 3 3
      KillingFloor/kfserver
  23. 3 3
      Left4Dead/l4dserver
  24. 3 3
      Left4Dead2/l4d2server
  25. 3 3
      NS2Combat/ns2cserver
  26. 3 3
      NaturalSelection2/ns2server
  27. 3 3
      NoMoreRoomInHell/nmrihserver
  28. 3 3
      OpposingForce/opforserver
  29. 3 3
      ProjectZomboid/pzserver
  30. 1 1
      README.md
  31. 3 3
      RedOrchestra/roserver
  32. 3 3
      Ricochet/ricochetserver
  33. 3 3
      SeriousSam3BFE/ss3sserver
  34. 3 3
      StarBound/sbserver
  35. 3 3
      TeamFortress2/tf2server
  36. 3 3
      TeamFortressClassic/tfcserver
  37. 4 3
      TeamSpeak3/ts3server
  38. 3 3
      UnrealTournament2004/ut2k4server
  39. 3 3
      UnrealTournament99/ut99server
  40. 1 1
      functions/fn_backup
  41. 1 1
      functions/fn_check_ip
  42. 1 1
      functions/fn_check_logs
  43. 1 1
      functions/fn_check_root
  44. 2 2
      functions/fn_check_steamcmd
  45. 1 1
      functions/fn_check_systemdir
  46. 3 3
      functions/fn_check_tmux
  47. 1 1
      functions/fn_check_ts3status
  48. 1 1
      functions/fn_compress_unreal2maps
  49. 1 1
      functions/fn_compress_ut99maps
  50. 1 1
      functions/fn_console
  51. 1 1
      functions/fn_csgofix
  52. 1 1
      functions/fn_debug
  53. 3 3
      functions/fn_details
  54. 1 1
      functions/fn_details_config
  55. 1 1
      functions/fn_details_distro
  56. 1 1
      functions/fn_email
  57. 1 1
      functions/fn_email_test
  58. 1 1
      functions/fn_functions
  59. 10 4
      functions/fn_getopt
  60. 1 1
      functions/fn_insfix
  61. 1 1
      functions/fn_install
  62. 1 1
      functions/fn_install_complete
  63. 21 21
      functions/fn_install_config
  64. 2 2
      functions/fn_install_gsquery
  65. 2 2
      functions/fn_install_header
  66. 1 1
      functions/fn_install_kffix
  67. 1 1
      functions/fn_install_logs
  68. 1 1
      functions/fn_install_retry
  69. 1 1
      functions/fn_install_rofix
  70. 1 1
      functions/fn_install_serverdir
  71. 11 5
      functions/fn_install_serverfiles
  72. 2 2
      functions/fn_install_steamcmd
  73. 1 1
      functions/fn_install_steamfix
  74. 1 1
      functions/fn_install_ut2k4
  75. 3 3
      functions/fn_install_ut2k4filesdl
  76. 1 1
      functions/fn_install_ut2k4fix
  77. 1 1
      functions/fn_install_ut2k4key
  78. 1 1
      functions/fn_install_ut99
  79. 3 3
      functions/fn_install_ut99filesdl
  80. 1 1
      functions/fn_install_ut99fix
  81. 18 16
      functions/fn_logs
  82. 1 1
      functions/fn_messages
  83. 1 1
      functions/fn_monitor
  84. 54 16
      functions/fn_start
  85. 1 1
      functions/fn_stop
  86. 22 8
      functions/fn_update_check
  87. 13 7
      functions/fn_update_dl
  88. 8 3
      functions/fn_validate

+ 142 - 3
.travis.yml

@@ -1,16 +1,155 @@
 language: bash
 
 before_script:
-    - curl -L "http://downloads.sourceforge.net/shunit2/shunit2-2.0.3.tgz" | tar zx
+    - curl -L "https://shunit2.googlecode.com/files/shunit2-2.1.6.tgz" | tar zx
 
+
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/7DaysToDie/serverfiles
+    - touch /home/travis/build/dgibbs64/linuxgsm/7DaysToDie/serverfiles/serverconfig.xml
+
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/CounterStrike/serverfiles/
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/CounterStrike/serverfiles/cstrike
+
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/CounterStrikeGlobalOffensive/serverfiles/
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/CounterStrikeGlobalOffensive/serverfiles/csgo
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/CounterStrikeGlobalOffensive/serverfiles/csgo/cfg
+
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/JustCause2/serverfiles/
+    - touch  /home/travis/build/dgibbs64/linuxgsm/JustCause2/serverfiles/default_config.lua
+
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/KillingFloor/serverfiles
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/KillingFloor/serverfiles/System
+    - touch /home/travis/build/dgibbs64/linuxgsm/KillingFloor/serverfiles/System/Default.ini
+
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/ProjectZomboid/Zomboid
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/ProjectZomboid/Zomboid/Server
+    - mkdir  /home/travis/build/dgibbs64/linuxgsm/ProjectZomboid/serverfiles
+    - mkdir  /home/travis/build/dgibbs64/linuxgsm/ProjectZomboid/serverfiles/projectzomboid
+
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/SeriousSam3BFE/serverfiles
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/SeriousSam3BFE/serverfiles/Content/
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/SeriousSam3BFE/serverfiles/Content/SeriousSam3
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/SeriousSam3BFE/serverfiles/Content/SeriousSam3/Config
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/SeriousSam3BFE/serverfiles/Bin
+
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/UnrealTournament2004/serverfiles
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/UnrealTournament2004/serverfiles/System
+    - touch /home/travis/build/dgibbs64/linuxgsm/UnrealTournament2004/serverfiles/System/ut2k4-server.ini
+
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/UnrealTournament99/serverfiles
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/UnrealTournament99/serverfiles/System
+    - touch /home/travis/build/dgibbs64/linuxgsm/UnrealTournament99/serverfiles/System/ut99-server.ini
+    - mkdir /home/travis/build/dgibbs64/linuxgsm/TeamSpeak3/serverfiles
 script:
+
+    - bash 7DaysToDie/sdtdserver auto-install
+    - bash 7DaysToDie/sdtdserver start
+    - bash 7DaysToDie/sdtdserver stop
+    - bash 7DaysToDie/sdtdserver restart
+    - bash 7DaysToDie/sdtdserver validate
+    - bash 7DaysToDie/sdtdserver monitor
+    - bash 7DaysToDie/sdtdserver email-test
+    - bash 7DaysToDie/sdtdserver details
+
+    - bash Arma3/arma3server auto-install
+    - bash Arma3/arma3server start
+    - bash Arma3/arma3server stop
+    - bash Arma3/arma3server restart
+    - bash Arma3/arma3server validate
+    - bash Arma3/arma3server monitor
+    - bash Arma3/arma3server email-test
+    - bash Arma3/arma3server details
+
+    - bash CounterStrike/csserver auto-install
+    - bash CounterStrike/csserver start
+    - bash CounterStrike/csserver stop
+    - bash CounterStrike/csserver restart
+    - bash CounterStrike/csserver validate
+    - bash CounterStrike/csserver monitor
+    - bash CounterStrike/csserver email-test
+    - bash CounterStrike/csserver details
+
     - bash CounterStrikeGlobalOffensive/csgoserver auto-install
     - bash CounterStrikeGlobalOffensive/csgoserver start
     - bash CounterStrikeGlobalOffensive/csgoserver stop
     - bash CounterStrikeGlobalOffensive/csgoserver restart
-    - bash CounterStrikeGlobalOffensive/csgoserver update
     - bash CounterStrikeGlobalOffensive/csgoserver validate
     - bash CounterStrikeGlobalOffensive/csgoserver monitor
     - bash CounterStrikeGlobalOffensive/csgoserver email-test
     - bash CounterStrikeGlobalOffensive/csgoserver details
-    - bash CounterStrikeGlobalOffensive/csgoserver backup
+
+    - bash JustCause2/jc2server auto-install
+    - bash JustCause2/jc2server start
+    - bash JustCause2/jc2server stop
+    - bash JustCause2/jc2server restart
+    - bash JustCause2/jc2server validate
+    - bash JustCause2/jc2server monitor
+    - bash JustCause2/jc2server email-test
+    - bash JustCause2/jc2server details
+
+    - bash KillingFloor/kfserver auto-install
+    - bash KillingFloor/kfserver start
+    - bash KillingFloor/kfserver stop
+    - bash KillingFloor/kfserver restart
+    - bash KillingFloor/kfserver validate
+    - bash KillingFloor/kfserver monitor
+    - bash KillingFloor/kfserver email-test
+    - bash KillingFloor/kfserver details
+
+    - bash NaturalSelection2/ns2server auto-install
+    - bash NaturalSelection2/ns2server start
+    - bash NaturalSelection2/ns2server stop
+    - bash NaturalSelection2/ns2server restart
+    - bash NaturalSelection2/ns2server validate
+    - bash NaturalSelection2/ns2server monitor
+    - bash NaturalSelection2/ns2server email-test
+    - bash NaturalSelection2/ns2server details
+
+    - bash ProjectZomboid/pzserver auto-install
+    - bash ProjectZomboid/pzserver start
+    - bash ProjectZomboid/pzserver stop
+    - bash ProjectZomboid/pzserver restart
+    - bash ProjectZomboid/pzserver validate
+    - bash ProjectZomboid/pzserver monitor
+    - bash ProjectZomboid/pzserver email-test
+    - bash ProjectZomboid/pzserver details
+
+    - bash SeriousSam3BFE/ss3sserver auto-install
+    - bash SeriousSam3BFE/ss3sserver start
+    - bash SeriousSam3BFE/ss3sserver stop
+    - bash SeriousSam3BFE/ss3sserver restart
+    - bash SeriousSam3BFE/ss3sserver validate
+    - bash SeriousSam3BFE/ss3sserver monitor
+    - bash SeriousSam3BFE/ss3sserver email-test
+    - bash SeriousSam3BFE/ss3sserver details
+
+    - bash StarBound/sbserver auto-install
+    - bash StarBound/sbserver start
+    - bash StarBound/sbserver stop
+    - bash StarBound/sbserver restart
+    - bash StarBound/sbserver validate
+    - bash StarBound/sbserver monitor
+    - bash StarBound/sbserver email-test
+    - bash StarBound/sbserver details
+
+    - bash UnrealTournament2004/ut2k4server start
+    - bash UnrealTournament2004/ut2k4server stop
+    - bash UnrealTournament2004/ut2k4server restart
+    - bash UnrealTournament2004/ut2k4server monitor
+    - bash UnrealTournament2004/ut2k4server email-test
+    - bash UnrealTournament2004/ut2k4server details
+
+    - bash UnrealTournament99/ut99server start
+    - bash UnrealTournament99/ut99server stop
+    - bash UnrealTournament99/ut99server restart
+    - bash UnrealTournament99/ut99server monitor
+    - bash UnrealTournament99/ut99server email-test
+    - bash UnrealTournament99/ut99server details
+
+    - bash TeamSpeak3/ts3server start
+    - bash TeamSpeak3/ts3server stop
+    - bash TeamSpeak3/ts3server restart
+    - bash TeamSpeak3/ts3server update
+    - bash TeamSpeak3/ts3server monitor
+    - bash TeamSpeak3/ts3server email-test
+    - bash TeamSpeak3/ts3server details

+ 3 - 3
7DaysToDie/sdtdserver

@@ -2,8 +2,8 @@
 # 7 Days To Die
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -85,7 +85,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 7 - 4
Arma3/arma3server

@@ -3,8 +3,8 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Contributor: Scarsz
-# Website: http://danielgibbs.co.uk
-# Version: 200315
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -27,7 +27,7 @@ parms="-netlog -ip=${ip} -cfg=${networkcfgfullpath} -config=${servercfgfullpath}
 #### Advanced Variables ####
 
 # ARMA 3 Modules
-# add mods with relative paths: 
+# add mods with relative paths:
 # mods/\@CBA_A3\;
 # or several mods as:
 # mods/\@CBA_A3\;mods/\@task_force_radio
@@ -35,7 +35,10 @@ parms="-netlog -ip=${ip} -cfg=${networkcfgfullpath} -config=${servercfgfullpath}
 mods=""
 
 # Steam
+# Stable
 appid="233780"
+# Development
+# appid="233780 -beta development"
 
 # Server Details
 servicename="arma3-server"
@@ -82,7 +85,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
BladeSymphony/bsserver

@@ -2,8 +2,8 @@
 # Blade Symphony
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
CounterStrike/csserver

@@ -2,8 +2,8 @@
 # Counter Strike
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 010215
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -77,7 +77,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
CounterStrikeConditionZero/csczserver

@@ -2,8 +2,8 @@
 # Counter Strike: Condition Zero
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -77,7 +77,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
CounterStrikeGlobalOffensive/csgoserver

@@ -2,8 +2,8 @@
 # Counter Strike: Global Offensive
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -95,7 +95,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
CounterStrikeSource/cssserver

@@ -2,8 +2,8 @@
 # Counter Strike: Source
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
DayOfDefeat/dodserver

@@ -2,8 +2,8 @@
 # Day of Defeat
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -77,7 +77,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
DayOfDefeatSource/dodsserver

@@ -2,8 +2,8 @@
 # Day of Defeat: Source
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 2 - 2
DeathmatchClassic/dmcserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 150315
+# Version: 030515
 
 #### Variables ####
 
@@ -77,7 +77,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 2 - 2
DoubleActionBoogaloo/dabserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 220315
+# Version: 030515
 
 #### Variables ####
 
@@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
FistfulOfFrags/fofserver

@@ -2,8 +2,8 @@
 # Fistful Of Frags
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 2 - 2
GameServerQuery/gsquery.py

@@ -2,8 +2,8 @@
 # -*- coding: utf-8 -*-
 # Game Server Query
 # Author: Anonymous & Daniel Gibbs
-# # Website: http://danielgibbs.co.uk
-# Version: 210115
+# # Website: http://gameservermanagers.com
+# Version: 030515
 
 import optparse
 import socket

+ 3 - 3
GarrysMod/gmodserver

@@ -2,8 +2,8 @@
 # Garry's Mod
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 160315
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -84,7 +84,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
HalfLife2Deathmatch/hl2dmserver

@@ -2,8 +2,8 @@
 # Half Life 2: Deathmatch
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 2 - 2
HalfLifeDeathmatch/hldmserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 150315
+# Version: 030515
 
 #### Variables ####
 
@@ -77,7 +77,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 15 - 0
HalfLifeDeathmatchSource/cfg/lgsm-default.cfg

@@ -0,0 +1,15 @@
+// Server Name
+hostname "hostname"
+
+// RCON Password
+rcon_password "rconpassword"
+
+// Server Password
+sv_password ""
+
+// Server Logging
+log on
+sv_logbans 1
+sv_logecho 1
+sv_logfile 1
+sv_log_onefile 0

+ 98 - 0
HalfLifeDeathmatchSource/hldmsserver

@@ -0,0 +1,98 @@
+#!/bin/bash
+# Half-Life Deathmatch: Source
+# Server Management Script
+# Author: Daniel Gibbs
+# Website: http://gameservermanagers.com
+# Version: 050515
+
+#### Variables ####
+
+# Notification Email
+# (on|off)
+emailnotification="off"
+email="email@example.com"
+
+# Steam login
+steamuser="anonymous"
+steampass=""
+
+# Start Variables
+defaultmap="crossfire"
+maxplayers="16"
+port="27015"
+sourcetvport="27020"
+clientport="27005"
+ip="0.0.0.0"
+
+# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
+fn_parms(){
+parms="-game hl1mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
+}
+
+#### Advanced Variables ####
+
+# Steam
+appid="255470"
+
+# Server Details
+servicename="hldms-server"
+gamename="Half-Life Deathmatch: Source"
+engine="source"
+
+# Directories
+rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+selfname="$(basename $0)"
+lockselfname=".${servicename}.lock"
+filesdir="${rootdir}/serverfiles"
+systemdir="${filesdir}/hl1mp"
+executabledir="${filesdir}"
+executable="./srcds_run"
+servercfgdir="${systemdir}/cfg"
+servercfg="${servicename}.cfg"
+servercfgfullpath="${servercfgdir}/${servercfg}"
+defaultcfg="${servercfgdir}/server.cfg"
+backupdir="${rootdir}/backups"
+
+# Logging
+logdays="7"
+gamelogdir="${systemdir}/logs"
+scriptlogdir="${rootdir}/log/script"
+consolelogdir="${rootdir}/log/console"
+
+scriptlog="${scriptlogdir}/${servicename}-script.log"
+consolelog="${consolelogdir}/${servicename}-console.log"
+emaillog="${scriptlogdir}/${servicename}-email.log"
+
+scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log"
+consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log"
+
+##### Script #####
+# Do not edit
+
+fn_runfunction(){
+# Functions are downloaded and run with this function
+if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
+	cd "${rootdir}"
+	if [ ! -d "functions" ]; then
+		mkdir functions
+	fi
+	cd functions
+	echo -e "loading ${functionfile}...\c"
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	chmod +x "${functionfile}"
+	cd "${rootdir}"
+	sleep 1
+fi
+source "${rootdir}/functions/${functionfile}"
+}
+
+fn_functions(){
+# Functions are defined in fn_functions.
+functionfile="${FUNCNAME}"
+fn_runfunction
+}
+
+fn_functions
+
+getopt=$1
+fn_getopt

+ 3 - 3
Insurgency/insserver

@@ -2,8 +2,8 @@
 # Insurgency
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
JustCause2/jc2server

@@ -2,8 +2,8 @@
 # Just Cause 2
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -73,7 +73,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
KillingFloor/kfserver

@@ -2,8 +2,8 @@
 # Killing Floor
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -80,7 +80,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
Left4Dead/l4dserver

@@ -3,8 +3,8 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Contributor: Summit Singh Thakur
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
Left4Dead2/l4d2server

@@ -2,8 +2,8 @@
 # Left 4 Dead 2
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -77,7 +77,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
NS2Combat/ns2cserver

@@ -2,8 +2,8 @@
 # NS2: Combat
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -83,7 +83,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
NaturalSelection2/ns2server

@@ -2,8 +2,8 @@
 # Natural Selection 2
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -83,7 +83,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
NoMoreRoomInHell/nmrihserver

@@ -2,8 +2,8 @@
 # No More Room in Hell
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
OpposingForce/opforserver

@@ -2,8 +2,8 @@
 # Half-Life: Opposing Force
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -77,7 +77,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
ProjectZomboid/pzserver

@@ -2,8 +2,8 @@
 # Project Zomboid
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 150415
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -72,7 +72,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 1 - 1
README.md

@@ -49,4 +49,4 @@ If you want to donate to the project you can via PayPal, Flattr or Gratipay. I h
 	<li><a href="https://twitter.com/dangibbsuk">Twitter</li>
 	<li><a href="https://www.facebook.com/linuxgsm">Facebook</li>
 	<li><a href="https://plus.google.com/+Gameservermanagers1">Google+</li>
-</ul>
+</ul>

+ 3 - 3
RedOrchestra/roserver

@@ -2,8 +2,8 @@
 # Red Orchestra: Ostfront 41-45
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -76,7 +76,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
Ricochet/ricochetserver

@@ -2,8 +2,8 @@
 # Ricochet
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -77,7 +77,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
SeriousSam3BFE/ss3sserver

@@ -2,8 +2,8 @@
 # Serious Sam 3: BFE
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -74,7 +74,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
StarBound/sbserver

@@ -2,8 +2,8 @@
 # Starbound
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 230215
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -73,7 +73,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
TeamFortress2/tf2server

@@ -2,8 +2,8 @@
 # Team Fortress 2
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
TeamFortressClassic/tfcserver

@@ -2,8 +2,8 @@
 # Team Fortress Classic
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -77,7 +77,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 4 - 3
TeamSpeak3/ts3server

@@ -2,8 +2,9 @@
 # Teamspeak 3
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 080214
+# Website: http://gameservermanagers.com
+# Version: 030515
+
 #### Variables ####
 
 # Notification Email
@@ -52,7 +53,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
UnrealTournament2004/ut2k4server

@@ -2,8 +2,8 @@
 # Unreal Tournament 2004
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 070215
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -67,7 +67,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 3 - 3
UnrealTournament99/ut99server

@@ -2,8 +2,8 @@
 # Unreal Tournament 99
 # Server Management Script
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 070215
+# Website: http://gameservermanagers.com
+# Version: 030515
 
 #### Variables ####
 
@@ -66,7 +66,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
 	fi
 	cd functions
 	echo -e "loading ${functionfile}...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
 	chmod +x "${functionfile}"
 	cd "${rootdir}"
 	sleep 1

+ 1 - 1
functions/fn_backup

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_backup function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 # Description: Creates a .tar.gz file in the backup directory.

+ 1 - 1
functions/fn_check_ip

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_check_ip function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 170415
 
 # Description: Automatically identifies the server interface IP.

+ 1 - 1
functions/fn_check_logs

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_check_logs function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 160415
 # Description: Checks that log files exist on server start
 

+ 1 - 1
functions/fn_check_root

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_check_root function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 if [ $(whoami) = "root" ]; then

+ 2 - 2
functions/fn_check_steamcmd

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_check_steamcmd function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 # Description: Downloads SteamCMD on install and checks if missing before running functions that require SteamCMD
@@ -21,7 +21,7 @@ elif [ "${modulename}" == "Starting" ]||[ "${modulename}" == "Update" ]; then
 		mkdir -pv "${rootdir}/steamcmd"
 		cd "${rootdir}/steamcmd"
 		echo -e "downloading steamcmd_linux.tar.gz...\c"
-		wget -N --no-check-certificate /dev/null http://media.steampowered.com/client/steamcmd_linux.tar.gz 2>&1 | grep -F HTTP | cut -c45-| uniq
+		wget -N /dev/null http://media.steampowered.com/client/steamcmd_linux.tar.gz 2>&1 | grep -F HTTP | cut -c45-| uniq
 		tar --verbose -zxf steamcmd_linux.tar.gz
 		rm -v steamcmd_linux.tar.gz
 		chmod +x steamcmd.sh

+ 1 - 1
functions/fn_check_systemdir

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_check_systemdir function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 if [ ! -e "${systemdir}" ]; then

+ 3 - 3
functions/fn_check_tmux

@@ -1,12 +1,12 @@
 #!/bin/bash
 # LGSM fn_check_tmux function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 170415
 
 # Checks if tmux is installed as too many users do not RTFM or know how to use Google.
 
-if [ "$(command -v tmux)" ]||[ "$(which tmux)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
+if [ "$(command -v tmux)" ]||[ "$(which tmux >/dev/null 2>&1)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
 	:
 else
 	fn_printfailnl "Tmux not installed"
@@ -15,6 +15,6 @@ else
 	echo "	* Tmux is required to run this server."
 	# Suitable passive agressive message
 	echo "	* Please see the the following link."
-	echo "  * http://gameservermanagers.com/tmux"
+	echo "	* http://gameservermanagers.com/tmux"
 	exit
 fi

+ 1 - 1
functions/fn_check_ts3status

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_check_ts3status function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 070215
 
 # Checks the status of Teamspeak 3.

+ 1 - 1
functions/fn_compress_unreal2maps

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_compress_unreal2maps function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 fn_check_root

+ 1 - 1
functions/fn_compress_ut99maps

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_compress_ut99maps function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 fn_check_root

+ 1 - 1
functions/fn_console

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_console function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 # Description: Gives access to the server tmux console.

+ 1 - 1
functions/fn_csgofix

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_csgofix function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 # Description: Resolves various issues with csgo.

+ 1 - 1
functions/fn_debug

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_debug function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 160415
 
 # Description: Runs the server without tmux. Runs direct from the terminal.

+ 3 - 3
functions/fn_details

@@ -1,8 +1,8 @@
 #!/bin/bash
 # LGSM fn_details function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 160414
+# Website: http://gameservermanagers.com
+# Version: 190414
 
 # Description: Displays server infomation.
 
@@ -424,7 +424,7 @@ echo -e ""
 echo -e "\e[92m${servername} Telnet\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 echo -e "\e[34mTelnet enabled:\t\e[0m${telnetenabled}" >> .fn_details_ports
-echo -e "\e[34mTelnet address:\t\e[0m${ip}:${telnetport}" >> .fn_details_ports
+echo -e "\e[34mTelnet address:\t\e[0m${ip} ${telnetport}" >> .fn_details_ports
 echo -e "\e[34mTelnet password:\t\e[0m${telnetpass}" >> .fn_details_ports
 column -s $'\t' -t .fn_details_ports
 rm -f .fn_details_ports

+ 1 - 1
functions/fn_details_config

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_details_config function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 160415
 
 # Description: Gets specific details from config files.

+ 1 - 1
functions/fn_details_distro

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_details_distro function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 140215
 
 # Description: Variables providing useful info on the Operating System such as disk and performace info.

+ 1 - 1
functions/fn_email

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_email function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 # Description: Sends email notification if monitor picks up a failure.

+ 1 - 1
functions/fn_email_test

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_email_test function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 # Description: Sends a test email notification.

+ 1 - 1
functions/fn_functions

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_functions function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 110415
 
 # Description: Defines all functions to allow download and execution of functions using fn_runfunction.

+ 10 - 4
functions/fn_getopt

@@ -1,8 +1,8 @@
 #!/bin/bash
 # LGSM fn_getopt function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 150414
+# Website: http://gameservermanagers.com
+# Version: 060515
 
 # Description: getopt arguments.
 
@@ -16,6 +16,12 @@ case "$getopt" in
 		fn_restart;;
 	update)
 		fn_update_check;;
+	force-update)
+		forceupdate=1;
+		fn_update_check;;
+	update-restart)
+		forceupdate=1;
+		fn_update_check;;
 	validate)
 		fn_validate;;
 	monitor)
@@ -35,7 +41,7 @@ case "$getopt" in
 	auto-install)
 		fn_autoinstall;;
 	*)
-	echo "Usage: $0 {start|stop|restart|update|validate|monitor|email-test|details|backup|console|debug|install|auto-install}"
+	echo "Usage: $0 {start|stop|restart|update|force-update|validate|monitor|email-test|details|backup|console|debug|install|auto-install}"
 	exit 1;;
 esac
 exit
@@ -178,4 +184,4 @@ elif [ "${engine}" == "unreal" ]; then
 	fn_getopt_unreal
 else
 	fn_getopt_generic
-fi
+fi

+ 1 - 1
functions/fn_insfix

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_insfix function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 110415
 
 # Description: Resolves ./srcds_linux: error while loading shared libraries: libtier0.so: cannot open shared object file: No such file or directory

+ 1 - 1
functions/fn_install

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_install function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 060315
 
 fn_check_root

+ 1 - 1
functions/fn_install_complete

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_install_complete function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 echo "================================="

+ 21 - 21
functions/fn_install_config

@@ -143,73 +143,73 @@ if [ "${gamename}" == "7 Days To Die" ]; then
 	fn_unity3dconfig
 elif [ "${gamename}" == "ARMA 3" ]; then
 	echo -e "downloading lgsm-default.server.cfg & lgsm-default.network.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/Arma3/cfg/lgsm-default.server.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/Arma3/cfg/lgsm-default.network.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/Arma3/cfg/lgsm-default.server.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/Arma3/cfg/lgsm-default.network.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_arma3config
 elif [ "${gamename}" == "Blade Symphony" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/BladeSymphony/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/BladeSymphony/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_goldsourceconfig
 elif [ "${gamename}" == "Counter Strike 1.6" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/CounterStrike/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/CounterStrike/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_goldsourceconfig
 elif [ "${gamename}" == "Counter Strike: Condition Zero" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/CounterStrikeConditionZero/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/CounterStrikeConditionZero/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_goldsourceconfig
 elif [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_sourceconfig
 elif [ "${gamename}" == "Counter Strike: Source" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/CounterStrikeSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/CounterStrikeSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_sourceconfig
 elif [ "${gamename}" == "Day of Defeat" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/DayOfDefeat/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/DayOfDefeat/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_goldsourceconfig
 elif [ "${gamename}" == "Day of Defeat: Source" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/DayOfDefeatSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/DayOfDefeatSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_sourceconfig
 elif [ "${gamename}" == "Double Action: Boogaloo" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/DoubleActionBoogaloo/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/DoubleActionBoogaloo/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_sourceconfig
 elif [ "${gamename}" == "Fistful of Frags" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/FistfulOfFrags/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/FistfulOfFrags/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_sourceconfig
 elif [ "${gamename}" == "Garry's Mod" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/GarrysMod/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/GarrysMod/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_sourceconfig
 elif [ "${gamename}" == "Half Life 2: Deathmatch" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/HalfLife2Deathmatch/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/HalfLife2Deathmatch/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_sourceconfig
 elif [ "${gamename}" == "Half Life: Deathmatch Classic" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/HalfLifeDeathmatchClassic/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/HalfLifeDeathmatchClassic/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_goldsourceconfig
 elif [ "${gamename}" == "Insurgency" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/Insurgency/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/Insurgency/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_sourceconfig
 elif [ "${gamename}" == "Just Cause 2" ]; then
@@ -218,17 +218,17 @@ elif [ "${gamename}" == "Killing Floor" ]; then
 	fn_unreal2config
 elif [ "${gamename}" == "Left 4 Dead" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/Left4Dead/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/Left4Dead/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_sourceconfig
 elif [ "${gamename}" == "Left 4 Dead 2" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/Left4Dead2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/Left4Dead2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_sourceconfig
 elif [ "${gamename}" == "No More Room in Hell" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/NoMoreRoomInHell/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/NoMoreRoomInHell/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_sourceconfig
 elif [ "${gamename}" == "Natural Selection 2" ]; then
@@ -239,17 +239,17 @@ elif [ "${gamename}" == "Red Orchestra: Ostfront 41-45" ]; then
 	fn_unreal2config
 elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then
 	echo -e "downloading lgsm-default.ini...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/SeriousSam3BFE/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/SeriousSam3BFE/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_serious3config
 elif [ "${gamename}" == "Team Fortress 2" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/TeamFortress2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/TeamFortress2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_sourceconfig
 elif [ "${gamename}" == "Team Fortress Classic" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
-	wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/TeamFortressClassic/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
+	wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/TeamFortressClassic/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_goldsourceconfig
 elif [ "${gamename}" == "Unreal Tournament 2004" ]; then

+ 2 - 2
functions/fn_install_gsquery

@@ -1,13 +1,13 @@
 #!/bin/bash
 # LGSM fn_install_gsquery function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 100415
 
 fn_dlgsquery(){
 cd "${rootdir}"
 echo -e "downloading gsquery.py...\c"
-wget -N --no-check-certificate /dev/null "http://gameservermanagers.com/dl/gsquery.py" 2>&1 | grep -F "HTTP" | grep -v "Moved Permanently" | cut -c45- | uniq
+wget -N /dev/null "http://gameservermanagers.com/dl/gsquery.py" 2>&1 | grep -F "HTTP" | grep -v "Moved Permanently" | cut -c45- | uniq
 chmod +x gsquery.py
 }
 

+ 2 - 2
functions/fn_install_header

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_install_header function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 clear
@@ -14,5 +14,5 @@ if [ "${gamename}" == "ARMA 3" ]; then
 elif [ "${gamename}" == "Left 4 Dead" ]; then
 	echo "contributions by Summit Singh Thakur"
 fi
-echo "http://danielgibbs.co.uk"
+echo "http://gameservermanagers.com"
 echo "================================="

+ 1 - 1
functions/fn_install_kffix

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_install_kffix function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 echo "Applying ${gamename} Server Fixes"

+ 1 - 1
functions/fn_install_logs

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_install_logs function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 160415
 
 echo ""

+ 1 - 1
functions/fn_install_retry

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_install_retry function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 while true; do

+ 1 - 1
functions/fn_install_rofix

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_install_rofix function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 echo "Applying ${gamename} Server Fixes"

+ 1 - 1
functions/fn_install_serverdir

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_install_serverdir function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 echo ""

+ 11 - 5
functions/fn_install_serverfiles

@@ -1,8 +1,8 @@
 #!/bin/bash
 # LGSM fn_install_serverfiles function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 210115
+# Website: http://gameservermanagers.com
+# Version: 050515
 
 fn_steaminstallcommand(){
 counter="0"
@@ -27,10 +27,16 @@ while [ "${counter}" == "0" ]||[ "$(grep -wc 0x402 .fn_install_serverfiles.tmp)"
 			rm -rf "${rootdir}/steamcmd"
 			fn_check_steamcmd
 		fi
+
+		# Detects if unbuffer command is available.
+		if [ $(command -v unbuffer) ]; then
+			unbuffer=unbuffer
+		fi
+
 		if [ "${counter}" -le "4" ]; then
-			./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit |tee .fn_install_serverfiles.tmp
+			${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit |tee .fn_install_serverfiles.tmp
 		elif [ "${counter}" -ge "5" ]; then
-			./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit |tee .fn_install_serverfiles.tmp
+			${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit |tee .fn_install_serverfiles.tmp
 		fi
 	elif [ "${counter}" -ge "11" ]; then
 		fn_printfailurenl "SteamCMD did not complete the download, too many retrys"
@@ -45,7 +51,7 @@ if [ "${engine}" == "goldsource" ]; then
 	counter="0"
 	while [ "${counter}" -le "4" ]; do
 		counter=$((counter+1))
-		./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit |tee .fn_install_serverfiles.tmp
+		${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit |tee .fn_install_serverfiles.tmp
 	done
 fi
 rm -f .fn_install_serverfiles.tmp

+ 2 - 2
functions/fn_install_steamcmd

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_check_steamcmd function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 # Description: Downloads SteamCMD on install and checks if missing before running functions that require SteamCMD
@@ -15,7 +15,7 @@ sleep 1
 cd "steamcmd"
 if [ ! -f steamcmd.sh ]; then
 		echo -e "downloading steamcmd_linux.tar.gz...\c"
-		wget -N --no-check-certificate /dev/null http://media.steampowered.com/client/steamcmd_linux.tar.gz 2>&1 | grep -F HTTP | cut -c45-| uniq
+		wget -N /dev/null http://media.steampowered.com/client/steamcmd_linux.tar.gz 2>&1 | grep -F HTTP | cut -c45-| uniq
 		tar --verbose -zxf steamcmd_linux.tar.gz
 		rm -v steamcmd_linux.tar.gz
 		chmod +x steamcmd.sh

+ 1 - 1
functions/fn_install_steamfix

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_install_steamfix function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 fn_steamclientfix(){

+ 1 - 1
functions/fn_install_ut2k4

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_install_ut2k4 function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 echo "Installing ${gamename} Server"

+ 3 - 3
functions/fn_install_ut2k4filesdl

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_install_ut2k4filesdl function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 echo "Downloading Server Files"
@@ -10,7 +10,7 @@ cd "${rootdir}"
 mkdir -pv "${filesdir}"
 cd "${filesdir}"
 if [ ! -f dedicatedserver3339-bonuspack.zip ]; then
-	wget http://danielgibbs.co.uk/wp-content/uploads/ut2004/dedicatedserver3339-bonuspack.zip
+	wget http://gameservermanagers.com/files/ut2004/dedicatedserver3339-bonuspack.zip
 else
 	echo "dedicatedserver3339-bonuspack.zip already downloaded!"
 fi
@@ -31,7 +31,7 @@ else
 	echo "MD5 checksum: PASSED"
 fi
 if [ ! -f ut2004-lnxpatch3369-2.tar.bz2 ]; then
-	wget http://danielgibbs.co.uk/wp-content/uploads/ut2004/ut2004-lnxpatch3369-2.tar.bz2
+	wget http://gameservermanagers.com/files/ut2004/ut2004-lnxpatch3369-2.tar.bz2
 else
 	echo "ut2004-lnxpatch3369-2.tar.bz2 already downloaded!"
 fi

+ 1 - 1
functions/fn_install_ut2k4fix

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_install_ut2k4fix function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 echo "Applying ${gamename} Server Fixes"

+ 1 - 1
functions/fn_install_ut2k4key

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_install_ut2k4key function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 echo "Enter ${gamename} CD Key"

+ 1 - 1
functions/fn_install_ut99

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_install_ut99 function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 echo "Installing ${gamename} Server"

+ 3 - 3
functions/fn_install_ut99filesdl

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_install_ut99filesdl function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 210115
 
 echo "Downloading Server Files"
@@ -10,7 +10,7 @@ cd "${rootdir}"
 mkdir -pv "${filesdir}"
 cd "${filesdir}"
 if [ ! -f ut-server-436.tar.gz ]; then
-	wget http://danielgibbs.co.uk/wp-content/uploads/ut-server-436.tar.gz
+	wget http://gameservermanagers.com/files/ut99/ut-server-436.tar.gz
 else
 	echo "ut-server-436.tar.gz already downloaded!"
 fi
@@ -31,7 +31,7 @@ else
 	echo "MD5 checksum: PASSED"
 fi
 if [ ! -f UTPGPatch451.tar.bz2 ]; then
-	wget http://danielgibbs.co.uk/wp-content/uploads/UTPGPatch451.tar.bz2
+	wget http://gameservermanagers.com/files/ut99/UTPGPatch451.tar.bz2
 else
 	echo "UTPGPatch451.tar.bz2 already downloaded!"
 fi

+ 1 - 1
functions/fn_install_ut99fix

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_install_ut99fix function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 070215
 
 echo "Applying ${gamename} Server Fixes"

+ 18 - 16
functions/fn_logs

@@ -1,8 +1,8 @@
 #!/bin/bash
 # LGSM fn_logs function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 080214
+# Website: http://gameservermanagers.com
+# Version: 260415
 
 # Description: Acts as a log rotater, removing old logs.
 
@@ -14,7 +14,7 @@ if [ -n "${consolelog}" ]; then
 	fi
 fi
 # log manager will active if finds logs older than ${logdays}
-if [ $(find "${scriptlogdir}"/* -mtime +${logdays}|wc -l) -ne "0" ]; then
+if [ $(find "${scriptlogdir}"/ -mtime +${logdays}|wc -l) -ne "0" ]; then
 	fn_printdots "Starting"
 	sleep 1
 	fn_printok "Starting"
@@ -25,36 +25,38 @@ if [ $(find "${scriptlogdir}"/* -mtime +${logdays}|wc -l) -ne "0" ]; then
 	fn_scriptlog "Removing logs older than ${logdays} days"
 	sleep 1
 	echo -en "\n"
-	if [ "${engine}" == "unreal2" ]; then
-		find "${gamelogdir}"/* -mtime +${logdays}|tee >> "${scriptlog}"
+	if [ "${engine}" == "unreal2" ]||[ "${engine}" == "source" ]; then
+		find "${gamelogdir}"/ -mtime +${logdays}|tee >> "${scriptlog}"
 	fi
-	find "${scriptlogdir}"/* -mtime +${logdays}|tee >> "${scriptlog}"
+	find "${scriptlogdir}"/ -mtime +${logdays}|tee >> "${scriptlog}"
 	if [ -n "${consolelog}" ]; then
-		find "${consolelogdir}"/* -mtime +${logdays}|tee >> "${scriptlog}"
+		find "${consolelogdir}"/ -mtime +${logdays}|tee >> "${scriptlog}"
 	fi
-	if [ "${engine}" == "unreal2" ]; then
-		gamecount=$(find "${scriptlogdir}"/* -mtime +${logdays}|wc -l)
+	if [ "${engine}" == "unreal2" ]||[ "${engine}" == "source" ]; then
+		gamecount=$(find "${scriptlogdir}"/ -mtime +${logdays}|wc -l)
 	fi
-	scriptcount=$(find "${scriptlogdir}"/* -mtime +${logdays}|wc -l)
+	scriptcount=$(find "${scriptlogdir}"/ -mtime +${logdays}|wc -l)
 	echo "${consolelog}"
 	if [ -n "${consolelog}" ]; then
-		consolecount=$(find "${consolelogdir}"/* -mtime +${logdays}|wc -l)
+		consolecount=$(find "${consolelogdir}"/ -mtime +${logdays}|wc -l)
 	else
 		consolecount=0
 	fi
 
 	count=$((${scriptcount} + ${consolecount}))
-	if [ "${engine}" == "unreal2" ]; then
+	if [ "${engine}" == "unreal2" ]||[ "${engine}" == "source" ]; then
 		count=$((${scriptcount} + ${consolecount} + ${gamecount}))
 	else
 		count=$((${scriptcount} + ${consolecount}))
 	fi
-	if [ "${engine}" == "unreal2" ]; then
-		find "${gamelogdir}"/* -mtime +${logdays} -exec rm {} \;
+
+
+	if [ "${engine}" == "unreal2" ]||[ "${engine}" == "source" ]; then
+		find "${gamelogdir}"/ -mtime +${logdays} -exec rm {} \;
 	fi
-	find "${scriptlogdir}"/* -mtime +${logdays} -exec rm {} \;
+	find "${scriptlogdir}"/ -mtime +${logdays} -exec rm {} \;
 	if [ -n "${consolelog}" ]; then
-		find "${consolelogdir}"/* -mtime +${logdays} -exec rm {} \;
+		find "${consolelogdir}"/ -mtime +${logdays} -exec rm {} \;
 	fi
 	fn_printok "Removed ${count} log files"
 	fn_scriptlog "Removed ${count} log files"

+ 1 - 1
functions/fn_messages

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_messages function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 260115
 
 # Description: Defines on-screen messages such as [  OK  ] and how script logs look.

+ 1 - 1
functions/fn_monitor

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_monitor function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 230315
 
 # Description: Monitors server by checking for running proccesses

+ 54 - 16
functions/fn_start

@@ -1,8 +1,8 @@
 #!/bin/bash
 # LGSM fn_start function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 110415
+# Website: http://gameservermanagers.com
+# Version: 070515
 
 # Description: Starts the server.
 
@@ -10,14 +10,14 @@ local modulename="Starting"
 
 fn_start_teamspeak3(){
 # Create any missing log dirs
-if [ ! -d ${scriptlogdir} ];then
-	mkdir ${rootdir}/log
-	mkdir ${scriptlogdir}
+if [ ! -d "${scriptlogdir}" ];then
+	mkdir "${rootdir}/log"
+	mkdir "${scriptlogdir}"
 	fn_printinfo  "Creating log directorys ${scriptlogdir}"
 	fn_scriptlog "Creating log directorys ${scriptlogdir}"
 fi
-if [ ! -h ${rootdir}/log/server ]; then
-	ln -sv ${gamelogdir} ${rootdir}/log/server
+if [ ! -h "${rootdir}/log/server" ]; then
+	ln -sv "${gamelogdir} ${rootdir}/log/server"
 fi
 
 fn_check_root
@@ -30,7 +30,7 @@ if [ "${ts3status}" = "Server is running" ]; then
 	echo -en "\n"
 	exit
 fi
-if [ ! -e ${servercfgfullpath} ]; then
+if [ ! -e "${servercfgfullpath}" ]; then
 	fn_printwarn "${servercfgfullpath} is missing"
 	fn_scriptlog "${servercfgfullpath} is missing"
 	sleep 1
@@ -50,7 +50,7 @@ mv "${scriptlog}" "${scriptlogdate}"
 # Create lock file
 date > "${rootdir}/${lockselfname}"
 cd "${executabledir}"
-./ts3server_startscript.sh start inifile=${servercfgfullpath} > /dev/null 2>&1
+./ts3server_startscript.sh start inifile="${servercfgfullpath}" > /dev/null 2>&1
 sleep 1
 fn_check_ts3status
 if [ "${ts3status}" = "Server seems to have died" ] || [ "${ts3status}"	= "No server running (ts3server.pid is missing)" ];then
@@ -119,21 +119,59 @@ else
 fi
 sleep 1
 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -Ec "^${servicename}:")
+# If the server fails to start
 if [ "${tmuxwc}" -eq 0 ]; then
-	fn_printfailnl "Unable to start ${servername}"
+	fn_printfail "Unable to start ${servername}"
 	fn_scriptlog "Unable to start ${servername}"
-	echo -e "	Check log files: ${rootdir}/log"
-	echo -en "	Run debug mode: ./${selfname} debug"
+	sleep 1
 	if [ -s "${scriptlogdir}/.${servicename}-tmux-error.tmp" ]; then
-		fn_scriptlog "tmux returned the following error"
+		fn_printfail "Unable to start ${servername}: Tmux error:"
+		fn_scriptlog "Tmux error"
+		sleep 1
+		echo -en "\n"
+		echo ""
+		echo "Command"
+		echo "================================="
+		echo "tmux new-session -d -s ${servicename} "${executable} ${parms}""
+		echo "tmux new-session -d -s ${servicename} "${executable} ${parms}"" >> "${scriptlog}"
+		echo ""
+		echo "Error"
+		echo "================================="
+		cat "${scriptlogdir}/.${servicename}-tmux-error.tmp"
 		cat "${scriptlogdir}/.${servicename}-tmux-error.tmp" >> "${scriptlog}"
+
+		# Detected error http://gameservermanagers.com/issues
+		if [ $(grep -c "Operation not permitted" "${scriptlogdir}/.${servicename}-tmux-error.tmp") ];then
+		echo ""
+		echo "Fix"
+		echo "================================="
+			if [ ! $(grep "tty:" /etc/group|grep "$(whoami)") ];then
+				echo "$(whoami) is not part of the tty group."
+				fn_scriptlog "$(whoami) is not part of the tty group."
+				group=$(grep tty /etc/group)
+				echo ""
+				echo "	${group}"
+				fn_scriptlog "${group}"
+				echo ""
+				echo "Run the following command with root privileges."
+				echo ""
+				echo "	usermod -G tty $(whoami)"
+				echo ""
+				echo "http://gameservermanagers.com/tmux-op-perm"
+				fn_scriptlog "http://gameservermanagers.com/tmux-op-perm"
+			else
+				echo "No known fix currently. Please log an issue."
+				fn_scriptlog "No known fix currently. Please log an issue."
+				echo "http://gameservermanagers.com/issues"
+				fn_scriptlog "http://gameservermanagers.com/issues"
+			fi
+		fi
 	fi
 else
 	fn_printok "${servername}"
 	fn_scriptlog "Started ${servername}"
 fi
-rm "${scriptlogdir}/.${servicename}-tmux-error.tmp"
-sleep 1
+#rm "${scriptlogdir}/.${servicename}-tmux-error.tmp"
 echo -en "\n"
 }
 
@@ -141,4 +179,4 @@ if [ "${gamename}" == "Teamspeak 3" ]; then
 	fn_start_teamspeak3
 else
 	fn_start_tmux
-fi
+fi

+ 1 - 1
functions/fn_stop

@@ -1,7 +1,7 @@
 #!/bin/bash
 # LGSM fn_stop function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
+# Website: http://gameservermanagers.com
 # Version: 080214
 
 # Description: Stops the server.

+ 22 - 8
functions/fn_update_check

@@ -1,8 +1,8 @@
 #!/bin/bash
 # LGSM fn_update_check function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 170415
+# Website: http://gameservermanagers.com
+# Version: 080515
 
 # Description: Checks if a server update is available.
 
@@ -72,7 +72,8 @@ sleep 1
 fn_printok "Checking for update: Server logs"
 fn_scriptlog "Checking for update: Server logs"
 sleep 1
-requestrestart=$(grep -sc "MasterRequestRestart" "${consolelog}")
+requestrestart=$(grep -Ec "MasterRequestRestart" "${consolelog}")
+echo "${requestrestart}"
 if [ "${requestrestart}" -ge "1" ]; then
 	fn_printoknl "Server requesting update"
 	sleep 1
@@ -111,7 +112,7 @@ currentbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s '
 
 # Gets availablebuild info
 cd "${rootdir}/steamcmd"
-availablebuild=$(./steamcmd.sh +login "${steamuser}" "${steampass}" +app_info_print "${appid}" +app_info_print "${appid}" +quit | grep -EA 1000 "^\s+\"branches\"$" | grep -EA 5 "^\s+\"public\"$" | grep -m 1 -EB 10 "^\s+}$" | grep -E "^\s+\"buildid\"\s+" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\  -f3)
+availablebuild=$(./steamcmd.sh +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +app_info_print "${appid}" +quit | grep -EA 1000 "^\s+\"branches\"$" | grep -EA 5 "^\s+\"public\"$" | grep -m 1 -EB 10 "^\s+}$" | grep -E "^\s+\"buildid\"\s+" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\  -f3)
 if [ -z "${availablebuild}" ]; then
 	fn_printfail "Checking for update: SteamCMD"
 	fn_scriptlog "Failure! Checking for update: SteamCMD"
@@ -203,17 +204,29 @@ currentbuild=$(cat $(find ./* -name 'ts3server*_0.log' 2> /dev/null | sort | egr
 ts3arch=$(ls $(find ${filesdir}/ -name 'ts3server_*_*' 2> /dev/null | grep -v 'ts3server_minimal_runscript.sh' | sort | tail -1) | egrep -o '(amd64|x86)' | tail -1)
 
 # Gets availablebuild info
-wget "http://dl.4players.de/ts/releases/?C=M;O=D" -q -O -| grep -i dir | egrep -o '<a href=\".*\/\">.*\/<\/a>' | egrep -o '[0-9\.?]+'|uniq > .ts3_version_numbers.tmp
+
+# Grabs all version numbers not in correct order
+wget "http://dl.4players.de/ts/releases/?C=M;O=D" -q -O -| grep -i dir | egrep -o '<a href=\".*\/\">.*\/<\/a>' | egrep -o '[0-9\.?]+'|uniq > .ts3_version_numbers_unsorted.tmp
+
+# removes digits to allow sorting of numbers
+cat .ts3_version_numbers_unsort.tmp |tr -cd "[:digit:][*\n]" > .ts3_version_numbers_digit.tmp
+# Sorts numbers in to correct order
+# merges two files in to one with two columns sorts the numbers in to order then only outputs the second to the ts3_version_numbers.tmp
+paste .ts3_version_numbers_digit.tmp .ts3_version_numbers_unsorted.tmp |sort -rn|awk '{ print $2 }' > .ts3_version_numbers.tmp
+
 # Finds directory with most recent server version.
 while read ts3_version_number; do
 	wget --spider -q "http://dl.4players.de/ts/releases/${ts3_version_number}/teamspeak3-server_linux-${ts3arch}-${ts3_version_number}.tar.gz"
 	if [[ $? == 0 ]]; then
 		availablebuild="${ts3_version_number}"
 		# Break while-loop, if the latest release could be found
+		echo "http://dl.4players.de/ts/releases/${ts3_version_number}/teamspeak3-server_linux-${ts3arch}-${ts3_version_number}.tar.g"
 		break
 	fi
 done < .ts3_version_numbers.tmp
-rm .ts3_version_numbers.tmp
+rm -f .ts3_version_numbers_digit.tmp
+rm -f .ts3_version_numbers_unsorted.tmp
+rm -f .ts3_version_numbers.tmp
 
 # Checks availablebuild info is available
 if [ -z "${availablebuild}" ]; then
@@ -271,8 +284,9 @@ fi
 fn_printdots "Checking for update"
 if [ "${gamename}" == "Teamspeak 3" ]; then
 	fn_teamspeak3_check
-elif [ "${engine}" == "goldsource" ]; then
+elif [ "${engine}" == "goldsource" ]||[ "${forceupdate}" == "1" ]; then
 	# Goldsource servers bypass checks as fn_steamcmdcheck does not work for appid 90 servers.
+	# forceupdate bypasses checks
 	tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:")
 	if [ "${tmuxwc}" -eq 1 ]; then
 		fn_stop
@@ -284,4 +298,4 @@ elif [ "${engine}" == "goldsource" ]; then
 else
 	fn_logupdaterequest
 	fn_steamcmdcheck
-fi
+fi

+ 13 - 7
functions/fn_update_dl

@@ -1,8 +1,8 @@
 #!/bin/bash
 # LGSM fn_update_dl function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 150315
+# Website: http://gameservermanagers.com
+# Version: 050515
 
 # Description: Runs a server update.
 
@@ -20,7 +20,13 @@ fn_scriptlog "Updating ${servername}"
 sleep 1
 cd "${rootdir}"
 cd "steamcmd"
-./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit|tee -a "${scriptlog}"
+
+# Detects if unbuffer command is available.
+if [ $(command -v unbuffer) ]; then
+	unbuffer=unbuffer
+fi
+
+${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit|tee -a "${scriptlog}"
 }
 
 fn_teamspeak3_dl(){
@@ -32,10 +38,10 @@ sleep 1
 fn_printoknl "Updating ${servername}"
 fn_scriptlog "Updating ${servername}"
 sleep 1
-cd ${rootdir}
+cd "${rootdir}"
 echo -e "downloading teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz...\c"
 fn_scriptlog "Downloading teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz"
-wget -N --no-check-certificate /dev/null http://dl.4players.de/ts/releases/${ts3_version_number}/teamspeak3-server_linux-${ts3arch}-${ts3_version_number}.tar.gz 2>&1 | grep -F HTTP | cut -c45-| uniq
+wget -N /dev/null http://dl.4players.de/ts/releases/${ts3_version_number}/teamspeak3-server_linux-${ts3arch}-${ts3_version_number}.tar.gz 2>&1 | grep -F HTTP | cut -c45-| uniq
 sleep 1
 echo -e "extracting teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz...\c"
 fn_scriptlog "Extracting teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz"
@@ -55,7 +61,7 @@ else
 fi
 echo -e "copying to ${filesdir}...\c"
 fn_scriptlog "Copying to ${filesdir}"
-cp -R ${rootdir}/teamspeak3-server_linux-${ts3arch}/* "${filesdir}" 2> "${scriptlogdir}/.${servicename}-cp-error.tmp"
+cp -R "${rootdir}/teamspeak3-server_linux-${ts3arch}/*" "${filesdir}" 2> "${scriptlogdir}/.${servicename}-cp-error.tmp"
 local status=$?
 if [ ${status} -eq 0 ]; then
 	echo "OK"
@@ -70,7 +76,7 @@ else
 	exit
 fi
 rm -f teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz
-rm -rf ${rootdir}/teamspeak3-server_linux-${ts3arch}
+rm -rf "${rootdir}/teamspeak3-server_linux-${ts3arch}"
 }
 
 if [ "${gamename}" == "Teamspeak 3" ]; then

+ 8 - 3
functions/fn_validate

@@ -1,8 +1,8 @@
 #!/bin/bash
 # LGSM fn_validate function
 # Author: Daniel Gibbs
-# Website: http://danielgibbs.co.uk
-# Version: 150415
+# Website: http://gameservermanagers.com
+# Version: 050515
 
 # Description: Runs a server validation.
 
@@ -22,7 +22,12 @@ fn_scriptlog "Checking server files"
 sleep 1
 cd "${rootdir}"
 cd "steamcmd"
-./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" validate +quit|tee -a "${scriptlog}"
+
+if [ $(command -v unbuffer) ]; then
+			unbuffer=unbuffer
+fi
+
+${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" validate +quit|tee -a "${scriptlog}"
 fn_scriptlog "Checking complete"
 }