Browse Source

Removed trailing spaces from files

Added     "trim_trailing_white_space_on_save": true in to my sublime
text install to make sure trailing spaces get removed.
pull/884/head
Daniel Gibbs 9 years ago
parent
commit
678f8b83f8
  1. 4
      7DaysToDie/sdtdserver
  2. 2
      ARKSurvivalEvolved/arkserver
  3. 4
      Arma3/arma3server
  4. 4
      BlackMesa/bmdmserver
  5. 4
      BladeSymphony/bsserver
  6. 4
      BrainBread2/bb2server
  7. 4
      CodenameCURE/ccserver
  8. 4
      CounterStrike/csserver
  9. 4
      CounterStrikeConditionZero/csczserver
  10. 4
      CounterStrikeGlobalOffensive/csgoserver
  11. 4
      CounterStrikeSource/cssserver
  12. 4
      DayOfDefeat/dodserver
  13. 4
      DayOfDefeatSource/dodsserver
  14. 4
      DeathmatchClassic/dmcserver
  15. 4
      DontStarveTogether/dstserver
  16. 4
      DoubleActionBoogaloo/dabserver
  17. 4
      FistfulOfFrags/fofserver
  18. 4
      GarrysMod/gmodserver
  19. 6
      GoldenEyeSource/gesserver
  20. 4
      HalfLife2Deathmatch/hl2dmserver
  21. 4
      HalfLifeDeathmatch/hldmserver
  22. 4
      HalfLifeDeathmatchSource/hldmsserver
  23. 4
      Hurtworld/hwserver
  24. 4
      Insurgency/insserver
  25. 4
      JustCause2/jc2server
  26. 4
      KillingFloor/kfserver
  27. 4
      Left4Dead/l4dserver
  28. 4
      Left4Dead2/l4d2server
  29. 4
      Mumble/mumbleserver
  30. 4
      NS2Combat/ns2cserver
  31. 4
      NaturalSelection2/ns2server
  32. 4
      NoMoreRoomInHell/nmrihserver
  33. 4
      OpposingForce/opforserver
  34. 4
      PiratesVikingandKnightsII/pvkiiserver
  35. 4
      ProjectZomboid/pzserver
  36. 4
      QuakeLive/qlserver
  37. 4
      RedOrchestra/roserver
  38. 4
      Ricochet/ricochetserver
  39. 6
      Rust/rustserver
  40. 4
      SeriousSam3BFE/ss3sserver
  41. 4
      StarBound/sbserver
  42. 4
      SvenCoop/svencoopserver
  43. 4
      TeamFortress2/tf2server
  44. 4
      TeamFortressClassic/tfcserver
  45. 4
      TeamSpeak3/ts3server
  46. 6
      Teeworlds/twserver
  47. 4
      Terraria/terrariaserver
  48. 4
      UnrealTournament2004/ut2k4server
  49. 2
      functions/command_update_functions.sh
  50. 6
      functions/core_functions.sh
  51. 6
      lgsm/functions/alert.sh
  52. 18
      lgsm/functions/alert_email.sh
  53. 32
      lgsm/functions/check_deps.sh
  54. 6
      lgsm/functions/check_permissions.sh
  55. 2
      lgsm/functions/check_root.sh
  56. 14
      lgsm/functions/check_steamcmd.sh
  57. 2
      lgsm/functions/check_system_dir.sh
  58. 36
      lgsm/functions/command_details.sh
  59. 18
      lgsm/functions/command_dev_detect_deps.sh
  60. 2
      lgsm/functions/command_install.sh
  61. 2
      lgsm/functions/command_monitor.sh
  62. 4
      lgsm/functions/command_start.sh
  63. 4
      lgsm/functions/command_stop.sh
  64. 2
      lgsm/functions/command_update_functions.sh
  65. 16
      lgsm/functions/core_dl.sh
  66. 6
      lgsm/functions/core_functions.sh
  67. 36
      lgsm/functions/core_getopt.sh
  68. 10
      lgsm/functions/core_messages.sh
  69. 16
      lgsm/functions/fix.sh
  70. 4
      lgsm/functions/fix_glibc.sh
  71. 4
      lgsm/functions/fix_steamcmd.sh
  72. 38
      lgsm/functions/info_config.sh
  73. 6
      lgsm/functions/info_glibc.sh
  74. 20
      lgsm/functions/info_parms.sh
  75. 6
      lgsm/functions/install_config.sh
  76. 2
      lgsm/functions/install_server_dir.sh
  77. 2
      lgsm/functions/install_ts3db.sh
  78. 4
      lgsm/functions/install_ut2k4_key.sh
  79. 2
      lgsm/functions/logs.sh
  80. 6
      lgsm/functions/monitor_gsquery.sh
  81. 10
      lgsm/functions/update_check.sh
  82. 12
      tests/tests_jc2server.sh
  83. 12
      tests/tests_ts3server.sh

4
7DaysToDie/sdtdserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -120,7 +120,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

2
ARKSurvivalEvolved/arkserver

@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
Arma3/arma3server

@ -21,7 +21,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -141,7 +141,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
BlackMesa/bmdmserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -129,7 +129,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
BladeSymphony/bsserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
BrainBread2/bb2server

@ -20,7 +20,7 @@ version="030616"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -129,7 +129,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
CodenameCURE/ccserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
CounterStrike/csserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
CounterStrikeConditionZero/csczserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
CounterStrikeGlobalOffensive/csgoserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -147,7 +147,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
CounterStrikeSource/cssserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
DayOfDefeat/dodserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
DayOfDefeatSource/dodsserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
DeathmatchClassic/dmcserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
DontStarveTogether/dstserver

@ -20,7 +20,7 @@ version="130516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -122,7 +122,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
DoubleActionBoogaloo/dabserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
FistfulOfFrags/fofserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
GarrysMod/gmodserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -141,7 +141,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

6
GoldenEyeSource/gesserver

@ -21,7 +21,7 @@ export MALLOC_CHECK_=0
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -52,7 +52,7 @@ parms="-game gesource -strictportbind -ip ${ip} -port ${port} +clientport ${clie
githubuser="dgibbs64" githubuser="dgibbs64"
githubrepo="linuxgsm" githubrepo="linuxgsm"
githubbranch="master" githubbranch="master"
# Steam - 2007 SDK # Steam - 2007 SDK
appid="310" appid="310"
@ -125,7 +125,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
HalfLife2Deathmatch/hl2dmserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
HalfLifeDeathmatch/hldmserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -123,7 +123,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
HalfLifeDeathmatchSource/hldmsserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
Hurtworld/hwserver

@ -21,7 +21,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -138,7 +138,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
Insurgency/insserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -126,7 +126,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
JustCause2/jc2server

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -118,7 +118,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
KillingFloor/kfserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -126,7 +126,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
Left4Dead/l4dserver

@ -21,7 +21,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
Left4Dead2/l4d2server

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -126,7 +126,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
Mumble/mumbleserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -103,7 +103,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
NS2Combat/ns2cserver

@ -20,7 +20,7 @@ version="220416"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -130,7 +130,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
NaturalSelection2/ns2server

@ -20,7 +20,7 @@ version="220416"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -130,7 +130,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
NoMoreRoomInHell/nmrihserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
OpposingForce/opforserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
PiratesVikingandKnightsII/pvkiiserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
ProjectZomboid/pzserver

@ -21,7 +21,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -122,7 +122,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
QuakeLive/qlserver

@ -20,7 +20,7 @@ version="060516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -128,7 +128,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
RedOrchestra/roserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -122,7 +122,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
Ricochet/ricochetserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

6
Rust/rustserver

@ -21,7 +21,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -36,7 +36,7 @@ servername="Rust"
ip="0.0.0.0" ip="0.0.0.0"
updateonstart="off" updateonstart="off"
port="28015" port="28015"
rconport="28016" rconport="28016"
rconpassword="CHANGE_ME" rconpassword="CHANGE_ME"
maxplayers="50" maxplayers="50"
@ -144,7 +144,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
SeriousSam3BFE/ss3sserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -121,7 +121,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
StarBound/sbserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -117,7 +117,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
SvenCoop/svencoopserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -123,7 +123,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
TeamFortress2/tf2server

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -129,7 +129,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
TeamFortressClassic/tfcserver

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -124,7 +124,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
TeamSpeak3/ts3server

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -100,7 +100,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

6
Teeworlds/twserver

@ -21,7 +21,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -85,7 +85,7 @@ emaillog="${scriptlogdir}/${servicename}-email.log"
scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').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" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log"
##### Script ##### ##### Script #####
# Do not edit # Do not edit
@ -120,7 +120,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
Terraria/terrariaserver

@ -21,7 +21,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -119,7 +119,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

4
UnrealTournament2004/ut2k4server

@ -20,7 +20,7 @@ version="210516"
emailalert="off" emailalert="off"
email="[email protected]" email="[email protected]"
# Pushbullet # Pushbullet
# https://www.pushbullet.com/#settings # https://www.pushbullet.com/#settings
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"
@ -112,7 +112,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

2
functions/command_update_functions.sh

@ -25,7 +25,7 @@ if [ -n "${functionsdir}" ]; then
if [ -d "${functionsdir}" ]; then if [ -d "${functionsdir}" ]; then
rm -rfv "${functionsdir}/"* rm -rfv "${functionsdir}/"*
exitcode=$? exitcode=$?
fi fi
fi fi
if [ "${exitcode}" == "0" ]; then if [ "${exitcode}" == "0" ]; then

6
functions/core_functions.sh

@ -11,13 +11,13 @@ if [ -z "${lgsmdir}" ]; then
lgsmdir="${rootdir}/lgsm" lgsmdir="${rootdir}/lgsm"
functionsdir="${lgsmdir}/functions" functionsdir="${lgsmdir}/functions"
libdir="${lgsmdir}/lib" libdir="${lgsmdir}/lib"
fi fi
fn_fetch_core_dl(){ fn_fetch_core_dl(){
if [ -z "${githubuser}" ]; then if [ -z "${githubuser}" ]; then
githubuser="dgibbs64" githubuser="dgibbs64"
fi fi
if [ -z "${githubrepo}" ]; then if [ -z "${githubrepo}" ]; then
githubrepo="linuxgsm" githubrepo="linuxgsm"
fi fi
if [ -z "${githubbranch}" ]; then if [ -z "${githubbranch}" ]; then
@ -52,7 +52,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"

6
lgsm/functions/alert.sh

@ -44,10 +44,10 @@ if [ "${emailnotification}" == "on" ]||[ "${emailalert}" == "on" ]&&[ -n "${emai
alert_email.sh alert_email.sh
elif [ "${emailnotification}" != "on" ]||[ "${emailalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then elif [ "${emailnotification}" != "on" ]||[ "${emailalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
fn_print_info_nl "Email alerts not enabled" fn_print_info_nl "Email alerts not enabled"
fn_scriptlog "Email alerts not enabled" fn_scriptlog "Email alerts not enabled"
elif [ -z "${email}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then elif [ -z "${email}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
fn_print_fail_nl "Email no set" fn_print_fail_nl "Email not set"
fn_scriptlog "Email no set" fn_scriptlog "Email not set"
fi fi
if [ "${pushbulletalert}" == "on" ]&&[ -n "${pushbullettoken}" ]; then if [ "${pushbulletalert}" == "on" ]&&[ -n "${pushbullettoken}" ]; then

18
lgsm/functions/alert_email.sh

@ -28,7 +28,7 @@ fn_details_os(){
# Hostname: hostname # Hostname: hostname
# tmux: tmux 1.8 # tmux: tmux 1.8
# GLIBC: 2.19 # GLIBC: 2.19
{ {
echo -e "" echo -e ""
echo -e "Distro Details" echo -e "Distro Details"
@ -56,7 +56,7 @@ fn_details_performance(){
{ {
echo -e "" echo -e ""
echo -e "Performance" echo -e "Performance"
echo -e "=================================" echo -e "================================="
echo -e "Uptime: ${days}d, ${hours}h, ${minutes}m" echo -e "Uptime: ${days}d, ${hours}h, ${minutes}m"
echo -e "Avg Load: ${load}" echo -e "Avg Load: ${load}"
echo -e "" echo -e ""
@ -124,7 +124,7 @@ fn_details_gameserver(){
echo -e "RCON password: ********" echo -e "RCON password: ********"
fi fi
# Admin password # Admin password
if [ -n "${adminpassword}" ]; then if [ -n "${adminpassword}" ]; then
echo -e "Admin password: ********" echo -e "Admin password: ********"
fi fi
@ -172,7 +172,7 @@ fn_alert_email_template_logs(){
{ {
echo -e "" echo -e ""
echo -e "${servicename} Logs" echo -e "${servicename} Logs"
echo -e "=================================" echo -e "================================="
if [ -n "${scriptlog}" ]; then if [ -n "${scriptlog}" ]; then
echo -e "\nScript log\n===================" echo -e "\nScript log\n==================="
@ -180,7 +180,7 @@ fn_alert_email_template_logs(){
echo "${scriptlogdir} (NO LOG FILES)" echo "${scriptlogdir} (NO LOG FILES)"
elif [ ! -s "${scriptlog}" ]; then elif [ ! -s "${scriptlog}" ]; then
echo "${scriptlog} (LOG FILE IS EMPTY)" echo "${scriptlog} (LOG FILE IS EMPTY)"
else else
echo "${scriptlog}" echo "${scriptlog}"
tail -25 "${scriptlog}" tail -25 "${scriptlog}"
fi fi
@ -193,7 +193,7 @@ fn_alert_email_template_logs(){
echo "${consolelogdir} (NO LOG FILES)" echo "${consolelogdir} (NO LOG FILES)"
elif [ ! -s "${consolelog}" ]; then elif [ ! -s "${consolelog}" ]; then
echo "${consolelog} (LOG FILE IS EMPTY)" echo "${consolelog} (LOG FILE IS EMPTY)"
else else
echo "${consolelog}" echo "${consolelog}"
tail -25 "${consolelog}" | awk '{ sub("\r$", ""); print }' tail -25 "${consolelog}" | awk '{ sub("\r$", ""); print }'
fi fi
@ -204,12 +204,12 @@ fn_alert_email_template_logs(){
echo -e "\nServer log\n===================" echo -e "\nServer log\n==================="
if [ ! "$(ls -A ${gamelogdir})" ]; then if [ ! "$(ls -A ${gamelogdir})" ]; then
echo "${gamelogdir} (NO LOG FILES)" echo "${gamelogdir} (NO LOG FILES)"
else else
echo "${gamelogdir}" echo "${gamelogdir}"
tail "${gamelogdir}"/* | grep -v "==>" | sed '/^$/d' | tail -25 tail "${gamelogdir}"/* | grep -v "==>" | sed '/^$/d' | tail -25
fi fi
echo "" echo ""
fi fi
} | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"| tee -a "${emaillog}" > /dev/null 2>&1 } | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"| tee -a "${emaillog}" > /dev/null 2>&1
} }
@ -223,7 +223,7 @@ check_ip.sh
emaillog="${emaillog}" emaillog="${emaillog}"
if [ -f "${emaillog}" ]; then if [ -f "${emaillog}" ]; then
rm "${emaillog}" rm "${emaillog}"
fi fi
fn_details_email fn_details_email
fn_details_os fn_details_os
fn_details_performance fn_details_performance

32
lgsm/functions/check_deps.sh

@ -15,7 +15,7 @@ fn_deps_detector(){
elif [ -n "$(command -v yum)" ]; then elif [ -n "$(command -v yum)" ]; then
yum -q list installed ${deptocheck} > /dev/null 2>&1 yum -q list installed ${deptocheck} > /dev/null 2>&1
depstatus=$? depstatus=$?
fi fi
if [ "${depstatus}" == "0" ]; then if [ "${depstatus}" == "0" ]; then
missingdep=0 missingdep=0
if [ "${function_selfname}" == "command_install.sh" ]; then if [ "${function_selfname}" == "command_install.sh" ]; then
@ -28,7 +28,7 @@ fn_deps_detector(){
if [ "${function_selfname}" == "command_install.sh" ]; then if [ "${function_selfname}" == "command_install.sh" ]; then
echo -e "\e[0;31m${deptocheck}\e[0m" echo -e "\e[0;31m${deptocheck}\e[0m"
sleep 0.5 sleep 0.5
fi fi
fi fi
# Missing dependencies are added to array_deps_missing # Missing dependencies are added to array_deps_missing
@ -49,8 +49,8 @@ fn_deps_email(){
array_deps_required+=( mailutils postfix ) array_deps_required+=( mailutils postfix )
elif [ -n "$(command -v yum)" ]; then elif [ -n "$(command -v yum)" ]; then
array_deps_required+=( mailx postfix ) array_deps_required+=( mailx postfix )
fi fi
else else
if [ -n "$(command -v dpkg-query)" ]; then if [ -n "$(command -v dpkg-query)" ]; then
array_deps_required+=( mailutils postfix ) array_deps_required+=( mailutils postfix )
elif [ -n "$(command -v yum)" ]; then elif [ -n "$(command -v yum)" ]; then
@ -77,12 +77,12 @@ fn_found_missing_deps(){
sleep 1 sleep 1
echo -en "...\r" echo -en "...\r"
sleep 1 sleep 1
echo -en " \r" echo -en " \r"
if [ -n "$(command -v dpkg-query)" ]; then if [ -n "$(command -v dpkg-query)" ]; then
echo "sudo dpkg --add-architecture i386; sudo apt-get install ${array_deps_missing[@]}" echo "sudo dpkg --add-architecture i386; sudo apt-get install ${array_deps_missing[@]}"
elif [ -n "$(command -v yum)" ]; then elif [ -n "$(command -v yum)" ]; then
echo "yum install ${array_deps_missing[@]}" echo "yum install ${array_deps_missing[@]}"
fi fi
else else
echo "" echo ""
fn_print_infomation_nl "$(whoami) does not have sudo access. Please manually install dependencies" fn_print_infomation_nl "$(whoami) does not have sudo access. Please manually install dependencies"
@ -92,13 +92,13 @@ fn_found_missing_deps(){
echo "sudo dpkg --add-architecture i386; sudo apt-get install ${array_deps_missing[@]}" echo "sudo dpkg --add-architecture i386; sudo apt-get install ${array_deps_missing[@]}"
elif [ -n "$(command -v yum)" ]; then elif [ -n "$(command -v yum)" ]; then
echo "yum install ${array_deps_missing[@]}" echo "yum install ${array_deps_missing[@]}"
fi fi
echo "" echo ""
fi fi
if [ "${function_selfname}" == "command_install.sh" ]; then if [ "${function_selfname}" == "command_install.sh" ]; then
sleep 5 sleep 5
fi fi
fi fi
} }
fn_check_loop(){ fn_check_loop(){
@ -108,7 +108,7 @@ fn_check_loop(){
fn_deps_detector fn_deps_detector
done done
# user to be informaed of any missing dependecies # user to be informaed of any missing dependecies
fn_found_missing_deps fn_found_missing_deps
} }
@ -139,7 +139,7 @@ if [ -n "$(command -v dpkg-query)" ]; then
array_deps_required+=( lib32gcc1 libstdc++6:i386 ) array_deps_required+=( lib32gcc1 libstdc++6:i386 )
else else
array_deps_required+=( libstdc++6:i386 ) array_deps_required+=( libstdc++6:i386 )
fi fi
fi fi
# Game Specific requirements # Game Specific requirements
@ -147,10 +147,10 @@ if [ -n "$(command -v dpkg-query)" ]; then
# Spark # Spark
if [ "${engine}" == "spark" ]; then if [ "${engine}" == "spark" ]; then
array_deps_required+=( speex:i386 libtbb2 ) array_deps_required+=( speex:i386 libtbb2 )
# 7 Days to Die # 7 Days to Die
elif [ "${gamename}" == "7 Days To Die" ]; then elif [ "${gamename}" == "7 Days To Die" ]; then
array_deps_required+=( telnet expect ) array_deps_required+=( telnet expect )
# No More Room in Hell # No More Room in Hell
elif [ "${gamename}" == "No More Room in Hell" ]; then elif [ "${gamename}" == "No More Room in Hell" ]; then
array_deps_required+=( lib32tinfo5 ) array_deps_required+=( lib32tinfo5 )
# Brainbread 2 and Don't Starve Together # Brainbread 2 and Don't Starve Together
@ -166,7 +166,7 @@ if [ -n "$(command -v dpkg-query)" ]; then
#UT99 #UT99
else else
array_deps_required+=( libsdl1.2debian bzip2 ) array_deps_required+=( libsdl1.2debian bzip2 )
fi fi
fi fi
fn_deps_email fn_deps_email
fn_check_loop fn_check_loop
@ -193,10 +193,10 @@ elif [ -n "$(command -v yum)" ]; then
# Spark # Spark
if [ "${engine}" == "spark" ]; then if [ "${engine}" == "spark" ]; then
array_deps_required+=( speex.i686 tbb.i686 ) array_deps_required+=( speex.i686 tbb.i686 )
# 7 Days to Die # 7 Days to Die
elif [ "${gamename}" == "7 Days To Die" ]; then elif [ "${gamename}" == "7 Days To Die" ]; then
array_deps_required+=( telnet expect ) array_deps_required+=( telnet expect )
# No More Room in Hell # No More Room in Hell
elif [ "${gamename}" == "No More Room in Hell" ]; then elif [ "${gamename}" == "No More Room in Hell" ]; then
array_deps_required+=( ncurses-libs.i686 ) array_deps_required+=( ncurses-libs.i686 )
# Brainbread 2 and Don't Starve Together # Brainbread 2 and Don't Starve Together
@ -212,7 +212,7 @@ elif [ -n "$(command -v yum)" ]; then
#UT99 #UT99
else else
array_deps_required+=( SDL.i686 bzip2 ) array_deps_required+=( SDL.i686 bzip2 )
fi fi
fi fi
fn_deps_email fn_deps_email
fn_check_loop fn_check_loop

6
lgsm/functions/check_permissions.sh

@ -40,7 +40,7 @@ fn_check_ownership(){
conclusionpermissionerror="1" conclusionpermissionerror="1"
fi fi
done <<< "$(find "${functionsdir}" -name "*.sh")" done <<< "$(find "${functionsdir}" -name "*.sh")"
if [ "${funownfail}" == "1" ]; then if [ "${funownfail}" == "1" ]; then
fn_print_fail_nl "Oops ! Ownership issue..." fn_print_fail_nl "Oops ! Ownership issue..."
echo " * Current - ${currentuser} - user or its group(s) - ${currentgroups} - does not own all scripts in \"${functionsdir}\"" echo " * Current - ${currentuser} - user or its group(s) - ${currentgroups} - does not own all scripts in \"${functionsdir}\""
@ -64,7 +64,7 @@ fn_check_permissions(){
conclusionpermissionerror="1" conclusionpermissionerror="1"
fi fi
fi fi
# Check functions permissions # Check functions permissions
funcpermfail="0" funcpermfail="0"
if [ -n "${functionsdir}" ]; then if [ -n "${functionsdir}" ]; then
@ -78,7 +78,7 @@ fn_check_permissions(){
conclusionpermissionerror="1" conclusionpermissionerror="1"
fi fi
done <<< "$(find "${functionsdir}" -name "*.sh")" done <<< "$(find "${functionsdir}" -name "*.sh")"
if [ "${funcpermfail}" == "1" ]; then if [ "${funcpermfail}" == "1" ]; then
fn_print_fail_nl "Oops ! Permission issue..." fn_print_fail_nl "Oops ! Permission issue..."
echo " * Current - ${currentuser} - user or its group(s) - ${currentgroups} need full control on scripts in \"${functionsdir}\"" echo " * Current - ${currentuser} - user or its group(s) - ${currentgroups} need full control on scripts in \"${functionsdir}\""

2
lgsm/functions/check_root.sh

@ -8,6 +8,6 @@ if [ $(whoami) = "root" ]; then
fn_print_fail_nl "Do NOT run this script as root!" fn_print_fail_nl "Do NOT run this script as root!"
if [ -d "${scriptlogdir}" ]; then if [ -d "${scriptlogdir}" ]; then
fn_scriptlog "${selfname} attempted to run as root." fn_scriptlog "${selfname} attempted to run as root."
fi fi
exit 1 exit 1
fi fi

14
lgsm/functions/check_steamcmd.sh

@ -18,9 +18,9 @@ fn_install_steamcmd(){
fn_check_steamcmd_user(){ fn_check_steamcmd_user(){
# Checks steamuser is setup. # Checks steamuser is setup.
if [ "${steamuser}" == "username" ]; then if [ "${steamuser}" == "username" ]; then
fn_print_fail_nl "Steam login not set. Update steamuser." fn_print_fail_nl "Steam login not set. Update steamuser."
echo " * Change steamuser=\"username\" to a valid steam login." echo " * Change steamuser=\"username\" to a valid steam login."
if [ -d "${scriptlogdir}" ]; then if [ -d "${scriptlogdir}" ]; then
fn_scriptlog "edit ${selfname}. change steamuser=\"username\" to a valid steam login." fn_scriptlog "edit ${selfname}. change steamuser=\"username\" to a valid steam login."
@ -36,7 +36,7 @@ fn_check_steamcmd_user(){
steamuser="anonymous" steamuser="anonymous"
steampass="" steampass=""
sleep 2 sleep 2
fi fi
} }
fn_check_steamcmd_sh(){ fn_check_steamcmd_sh(){
@ -46,7 +46,7 @@ fn_check_steamcmd_sh(){
if [ ! -f "${steamcmddir}/steamcmd.sh" ]; then if [ ! -f "${steamcmddir}/steamcmd.sh" ]; then
if [ "${function_selfname}" == "command_install.sh" ]; then if [ "${function_selfname}" == "command_install.sh" ]; then
fn_install_steamcmd fn_install_steamcmd
else else
fn_print_warn_nl "SteamCMD is missing" fn_print_warn_nl "SteamCMD is missing"
fn_scriptlog "SteamCMD is missing" fn_scriptlog "SteamCMD is missing"
sleep 1 sleep 1
@ -63,9 +63,9 @@ fn_check_steamcmd_guard(){
# Checks that steamcmd is working correctly and will prompt Steam Guard if required. # Checks that steamcmd is working correctly and will prompt Steam Guard if required.
"${steamcmddir}"/steamcmd.sh +login "${steamuser}" "${steampass}" +quit "${steamcmddir}"/steamcmd.sh +login "${steamuser}" "${steampass}" +quit
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
fn_print_failure_nl "Error running SteamCMD" fn_print_failure_nl "Error running SteamCMD"
fi fi
fi fi
} }
fn_check_steamcmd_user fn_check_steamcmd_user

2
lgsm/functions/check_system_dir.sh

@ -8,6 +8,6 @@ if [ ! -d "${systemdir}" ]; then
fn_print_fail_nl "Cannot access ${systemdir}: No such directory" fn_print_fail_nl "Cannot access ${systemdir}: No such directory"
if [ -d "${scriptlogdir}" ]; then if [ -d "${scriptlogdir}" ]; then
fn_scriptlog "Cannot access ${systemdir}: No such directory." fn_scriptlog "Cannot access ${systemdir}: No such directory."
fi fi
exit 1 exit 1
fi fi

36
lgsm/functions/command_details.sh

@ -32,7 +32,7 @@ fn_details_os(){
echo -e "\e[34mHostname:\t\e[0m$HOSTNAME" echo -e "\e[34mHostname:\t\e[0m$HOSTNAME"
echo -e "\e[34mtmux:\t\e[0m${tmuxv}" echo -e "\e[34mtmux:\t\e[0m${tmuxv}"
echo -e "\e[34mGLIBC:\t\e[0m${glibcversion}" echo -e "\e[34mGLIBC:\t\e[0m${glibcversion}"
} | column -s $'\t' -t } | column -s $'\t' -t
} }
fn_details_performance(){ fn_details_performance(){
@ -52,13 +52,13 @@ fn_details_performance(){
{ {
echo -e "\e[34mUptime:\t\e[0m${days}d, ${hours}h, ${minutes}m" echo -e "\e[34mUptime:\t\e[0m${days}d, ${hours}h, ${minutes}m"
echo -e "\e[34mAvg Load:\t\e[0m${load}" echo -e "\e[34mAvg Load:\t\e[0m${load}"
} | column -s $'\t' -t } | column -s $'\t' -t
echo -e "" echo -e ""
{ {
echo -e "\e[34mMem:\t\e[34mtotal\t used\t free\e[0m" echo -e "\e[34mMem:\t\e[34mtotal\t used\t free\e[0m"
echo -e "\e[34mPhysical:\t\e[0m${physmemtotal}\t${physmemused}\t${physmemfree}\e[0m" echo -e "\e[34mPhysical:\t\e[0m${physmemtotal}\t${physmemused}\t${physmemfree}\e[0m"
echo -e "\e[34mSwap:\t\e[0m${swaptotal}\t${swapused}\t${swapfree}\e[0m" echo -e "\e[34mSwap:\t\e[0m${swaptotal}\t${swapused}\t${swapfree}\e[0m"
} | column -s $'\t' -t } | column -s $'\t' -t
} }
fn_details_disk(){ fn_details_disk(){
@ -83,7 +83,7 @@ fn_details_disk(){
if [ -d "${backupdir}" ]; then if [ -d "${backupdir}" ]; then
echo -e "\e[34mBackups:\t\e[0m${backupdirdu}" echo -e "\e[34mBackups:\t\e[0m${backupdirdu}"
fi fi
} | column -s $'\t' -t } | column -s $'\t' -t
} }
fn_details_gameserver(){ fn_details_gameserver(){
@ -117,7 +117,7 @@ fn_details_gameserver(){
echo -e "\e[34mRCON password:\t\e[0m${rconpassword}" echo -e "\e[34mRCON password:\t\e[0m${rconpassword}"
fi fi
# Admin password # Admin password
if [ -n "${adminpassword}" ]; then if [ -n "${adminpassword}" ]; then
echo -e "\e[34mAdmin password:\t\e[0m${adminpassword}" echo -e "\e[34mAdmin password:\t\e[0m${adminpassword}"
fi fi
@ -158,7 +158,7 @@ fn_details_gameserver(){
else else
echo -e "\e[34mStatus:\t\e[0;32mONLINE\e[0m" echo -e "\e[34mStatus:\t\e[0;32mONLINE\e[0m"
fi fi
} | column -s $'\t' -t } | column -s $'\t' -t
echo -e "" echo -e ""
} }
@ -173,7 +173,7 @@ fn_details_script(){
# Update on start: off # Update on start: off
# Location: /home/lgsm/qlserver # Location: /home/lgsm/qlserver
# Config file: /home/lgsm/qlserver/serverfiles/baseq3/ql-server.cfg # Config file: /home/lgsm/qlserver/serverfiles/baseq3/ql-server.cfg
echo -e "\e[92m${selfname} Script Details\e[0m" echo -e "\e[92m${selfname} Script Details\e[0m"
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
{ {
@ -220,14 +220,14 @@ fn_details_script(){
echo -e "\e[34mConfig file:\t\e[0m${servercfgfullpath}" echo -e "\e[34mConfig file:\t\e[0m${servercfgfullpath}"
else else
echo -e "\e[34mConfig file:\t\e[0m\e[0;31m${servercfgfullpath}\e[0m (\e[0;31mFILE MISSING\e[0m)" echo -e "\e[34mConfig file:\t\e[0m\e[0;31m${servercfgfullpath}\e[0m (\e[0;31mFILE MISSING\e[0m)"
fi fi
fi fi
# Network config file location (ARMA 3) # Network config file location (ARMA 3)
if [ -n "${networkcfgfullpath}" ]; then if [ -n "${networkcfgfullpath}" ]; then
echo -e "\e[34mNetwork config file:\t\e[0m${networkcfgfullpath}" echo -e "\e[34mNetwork config file:\t\e[0m${networkcfgfullpath}"
fi fi
} | column -s $'\t' -t } | column -s $'\t' -t
} }
fn_details_backup(){ fn_details_backup(){
@ -252,7 +252,7 @@ fn_details_backup(){
echo -e "\e[34m date:\t\e[0m${lastbackupdate}" echo -e "\e[34m date:\t\e[0m${lastbackupdate}"
echo -e "\e[34m file:\t\e[0m${lastbackup}" echo -e "\e[34m file:\t\e[0m${lastbackup}"
echo -e "\e[34m size:\t\e[0m${lastbackupsize}" echo -e "\e[34m size:\t\e[0m${lastbackupsize}"
} | column -s $'\t' -t } | column -s $'\t' -t
fi fi
} }
@ -260,7 +260,7 @@ fn_details_commandlineparms(){
# #
# Command-line Parameters # Command-line Parameters
# ===================================== # =====================================
# ./run_server_x86.sh +set net_strict 1 # ./run_server_x86.sh +set net_strict 1
echo -e "" echo -e ""
echo -e "\e[92mCommand-line Parameters\e[0m" echo -e "\e[92mCommand-line Parameters\e[0m"
@ -318,7 +318,7 @@ fn_details_avalanche(){
{ {
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "> Game\tINBOUND\t${port}\tudp" echo -e "> Game\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t } | column -s $'\t' -t
} }
fn_details_dontstarve(){ fn_details_dontstarve(){
@ -327,7 +327,7 @@ fn_details_dontstarve(){
{ {
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "> Game\tINBOUND\t${port}\tudp" echo -e "> Game\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t } | column -s $'\t' -t
} }
fn_details_projectzomboid(){ fn_details_projectzomboid(){
@ -336,7 +336,7 @@ fn_details_projectzomboid(){
{ {
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "> Game\tINBOUND\t${port}\tudp" echo -e "> Game\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t } | column -s $'\t' -t
} }
@ -352,7 +352,7 @@ fn_details_realvirtuality(){
echo -e "> Game\tINBOUND\t${port}\tudp" echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp" echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp"
echo -e "> Steam: Master traffic\tINBOUND\t${masterport}\tudp" echo -e "> Steam: Master traffic\tINBOUND\t${masterport}\tudp"
} | column -s $'\t' -t } | column -s $'\t' -t
} }
fn_details_idtech3(){ fn_details_idtech3(){
@ -367,7 +367,7 @@ fn_details_idtech3(){
echo -e "> Game\tINBOUND\t${port}\tudp" echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> Rcon\tINBOUND\t${rconport}\tudp" echo -e "> Rcon\tINBOUND\t${rconport}\tudp"
echo -e "> Stats\tINBOUND\t${statsport}\tudp" echo -e "> Stats\tINBOUND\t${statsport}\tudp"
} | column -s $'\t' -t } | column -s $'\t' -t
} }
@ -378,7 +378,7 @@ fn_details_seriousengine35(){
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "> Game/RCON\tINBOUND\t${port}\ttcp" echo -e "> Game/RCON\tINBOUND\t${port}\ttcp"
echo -e "> Query\tINBOUND\t${queryport}\tudp" echo -e "> Query\tINBOUND\t${queryport}\tudp"
} | column -s $'\t' -t } | column -s $'\t' -t
} }
fn_details_source(){ fn_details_source(){
@ -551,7 +551,7 @@ fn_details_ark(){
# Run checks and gathers details to display. # Run checks and gathers details to display.
check.sh check.sh
info_config.sh info_config.sh
info_distro.sh info_distro.sh
info_glibc.sh info_glibc.sh

18
lgsm/functions/command_dev_detect_deps.sh

@ -22,7 +22,7 @@ elif [ "${executable}" == "./runSam3_DedicatedServer.sh" ]; then
elif [ "${executable}" == "./7DaysToDie.sh" ]; then elif [ "${executable}" == "./7DaysToDie.sh" ]; then
executable=7DaysToDie.x86 executable=7DaysToDie.x86
elif [ "${executable}" == "./ucc-bin" ]; then elif [ "${executable}" == "./ucc-bin" ]; then
if [ -f "${executabledir}/ucc-bin-real" ]; then if [ -f "${executabledir}/ucc-bin-real" ]; then
executable=ucc-bin-real executable=ucc-bin-real
elif [ -f "${executabledir}/ut2004-bin" ]; then elif [ -f "${executabledir}/ut2004-bin" ]; then
@ -32,7 +32,7 @@ elif [ "${executable}" == "./ucc-bin" ]; then
fi fi
elif [ "${executable}" == "./ts3server_startscript.sh" ]; then elif [ "${executable}" == "./ts3server_startscript.sh" ]; then
executable=ts3server_linux_amd64 executable=ts3server_linux_amd64
fi fi
if [ "$(command -v eu-readelf)" ]; then if [ "$(command -v eu-readelf)" ]; then
@ -40,7 +40,7 @@ if [ "$(command -v eu-readelf)" ]; then
elif [ "$(command -v readelf)" ]; then elif [ "$(command -v readelf)" ]; then
readelf=readelf readelf=readelf
else else
echo "readelf/eu-readelf not installed" echo "readelf/eu-readelf not installed"
fi fi
${readelf} -d ${executable} |grep NEEDED|awk '{ print $5 }'|sed 's/\[//g'|sed 's/\]//g' > "${rootdir}/.depdetect_readelf" ${readelf} -d ${executable} |grep NEEDED|awk '{ print $5 }'|sed 's/\[//g'|sed 's/\]//g' > "${rootdir}/.depdetect_readelf"
@ -55,28 +55,28 @@ while read lib; do
echo "glibc.i686" >> "${rootdir}/.depdetect_centos_list" echo "glibc.i686" >> "${rootdir}/.depdetect_centos_list"
echo "lib32gcc1" >> "${rootdir}/.depdetect_ubuntu_list" echo "lib32gcc1" >> "${rootdir}/.depdetect_ubuntu_list"
echo "lib32gcc1" >> "${rootdir}/.depdetect_debian_list" echo "lib32gcc1" >> "${rootdir}/.depdetect_debian_list"
elif [ "${lib}" == "libstdc++.so.6" ]; then elif [ "${lib}" == "libstdc++.so.6" ]; then
echo "libstdc++.i686" >> "${rootdir}/.depdetect_centos_list" echo "libstdc++.i686" >> "${rootdir}/.depdetect_centos_list"
echo "libstdc++6:i386" >> "${rootdir}/.depdetect_ubuntu_list" echo "libstdc++6:i386" >> "${rootdir}/.depdetect_ubuntu_list"
echo "libstdc++6:i386" >> "${rootdir}/.depdetect_debian_list" echo "libstdc++6:i386" >> "${rootdir}/.depdetect_debian_list"
elif [ "${lib}" == "libstdc++.so.5" ]; then elif [ "${lib}" == "libstdc++.so.5" ]; then
echo "compat-libstdc++-33.i686" >> "${rootdir}/.depdetect_centos_list" echo "compat-libstdc++-33.i686" >> "${rootdir}/.depdetect_centos_list"
echo "libstdc++5:i386" >> "${rootdir}/.depdetect_ubuntu_list" echo "libstdc++5:i386" >> "${rootdir}/.depdetect_ubuntu_list"
echo "libstdc++5:i386" >> "${rootdir}/.depdetect_debian_list" echo "libstdc++5:i386" >> "${rootdir}/.depdetect_debian_list"
elif [ "${lib}" == "libspeex.so.1" ]||[ "${lib}" == "libspeexdsp.so.1" ]; then elif [ "${lib}" == "libspeex.so.1" ]||[ "${lib}" == "libspeexdsp.so.1" ]; then
echo "speex.i686" >> "${rootdir}/.depdetect_centos_list" echo "speex.i686" >> "${rootdir}/.depdetect_centos_list"
echo "speex:i386" >> "${rootdir}/.depdetect_ubuntu_list" echo "speex:i386" >> "${rootdir}/.depdetect_ubuntu_list"
echo "speex:i386" >> "${rootdir}/.depdetect_debian_list" echo "speex:i386" >> "${rootdir}/.depdetect_debian_list"
elif [ "${lib}" == "./libSDL-1.2.so.0" ]||[ "${lib}" == "libSDL-1.2.so.0" ]; then elif [ "${lib}" == "./libSDL-1.2.so.0" ]||[ "${lib}" == "libSDL-1.2.so.0" ]; then
echo "SDL.i686" >> "${rootdir}/.depdetect_centos_list" echo "SDL.i686" >> "${rootdir}/.depdetect_centos_list"
echo "libsdl1.2debian" >> "${rootdir}/.depdetect_ubuntu_list" echo "libsdl1.2debian" >> "${rootdir}/.depdetect_ubuntu_list"
echo "libsdl1.2debian" >> "${rootdir}/.depdetect_debian_list" echo "libsdl1.2debian" >> "${rootdir}/.depdetect_debian_list"
elif [ "${lib}" == "libtbb.so.2" ]; then elif [ "${lib}" == "libtbb.so.2" ]; then
echo "tbb.i686" >> "${rootdir}/.depdetect_centos_list" echo "tbb.i686" >> "${rootdir}/.depdetect_centos_list"
echo "libtbb2" >> "${rootdir}/.depdetect_ubuntu_list" echo "libtbb2" >> "${rootdir}/.depdetect_ubuntu_list"
echo "libtbb2" >> "${rootdir}/.depdetect_debian_list" echo "libtbb2" >> "${rootdir}/.depdetect_debian_list"

2
lgsm/functions/command_install.sh

@ -13,7 +13,7 @@ check.sh
install_header.sh install_header.sh
install_server_dir.sh install_server_dir.sh
install_logs.sh install_logs.sh
check_deps.sh check_deps.sh
# Download and install # Download and install
if [ "${gamename}" == "Unreal Tournament 2004" ]; then if [ "${gamename}" == "Unreal Tournament 2004" ]; then
install_server_files.sh install_server_files.sh

2
lgsm/functions/command_monitor.sh

@ -34,7 +34,7 @@ fn_monitor_msg_checking(){
fn_print_dots "Checking session: " fn_print_dots "Checking session: "
fn_print_checking_eol fn_print_checking_eol
fn_scriptlog "Checking session: CHECKING" fn_scriptlog "Checking session: CHECKING"
sleep 1 sleep 1
} }
fn_monitor_teamspeak3(){ fn_monitor_teamspeak3(){

4
lgsm/functions/command_start.sh

@ -88,7 +88,7 @@ fn_start_tmux(){
date > "${rootdir}/${lockselfname}" date > "${rootdir}/${lockselfname}"
cd "${executabledir}" cd "${executabledir}"
tmux new-session -d -s "${servicename}" "${executable} ${parms}" 2> "${scriptlogdir}/.${servicename}-tmux-error.tmp" tmux new-session -d -s "${servicename}" "${executable} ${parms}" 2> "${scriptlogdir}/.${servicename}-tmux-error.tmp"
# tmux pipe-pane not supported in tmux versions < 1.6 # tmux pipe-pane not supported in tmux versions < 1.6
if [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd '[:digit:]')" -lt "16" ]; then if [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd '[:digit:]')" -lt "16" ]; then
echo "Console logging disabled: Tmux => 1.6 required" >> "${consolelog}" echo "Console logging disabled: Tmux => 1.6 required" >> "${consolelog}"
@ -177,7 +177,7 @@ logs.sh
if [ "${status}" == "0" ]; then if [ "${status}" == "0" ]; then
if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]||[ "${updateonstart}" == "on" ]; then if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]||[ "${updateonstart}" == "on" ]; then
update_check.sh update_check.sh
fi fi
fi fi
if [ "${gamename}" == "Teamspeak 3" ]; then if [ "${gamename}" == "Teamspeak 3" ]; then

4
lgsm/functions/command_stop.sh

@ -77,7 +77,7 @@ fn_stop_telnet_sdtd(){
expect { eof } expect { eof }
puts "Completed.\n" puts "Completed.\n"
') ')
} }
fn_stop_graceful_sdtd(){ fn_stop_graceful_sdtd(){
@ -120,7 +120,7 @@ fn_stop_graceful_sdtd(){
sleep 1 sleep 1
fn_print_dots "Graceful: rcon quit: ${seconds}" fn_print_dots "Graceful: rcon quit: ${seconds}"
done done
# If telnet failed will go straight to tmux shutdown. # If telnet failed will go straight to tmux shutdown.
# If cannot shutdown correctly world save may be lost # If cannot shutdown correctly world save may be lost
else else
if [ -n "${refused}" ]; then if [ -n "${refused}" ]; then

2
lgsm/functions/command_update_functions.sh

@ -25,7 +25,7 @@ if [ -n "${functionsdir}" ]; then
if [ -d "${functionsdir}" ]; then if [ -d "${functionsdir}" ]; then
rm -rfv "${functionsdir}/"* rm -rfv "${functionsdir}/"*
exitcode=$? exitcode=$?
fi fi
fi fi
if [ "${exitcode}" == "0" ]; then if [ "${exitcode}" == "0" ]; then

16
lgsm/functions/core_dl.sh

@ -31,14 +31,14 @@ fn_dl_md5(){
fn_scriptlog "verifying ${filename} with MD5: FAIL" fn_scriptlog "verifying ${filename} with MD5: FAIL"
fn_scriptlog "${filename} returned MD5 checksum: ${md5sumcmd}" fn_scriptlog "${filename} returned MD5 checksum: ${md5sumcmd}"
fn_scriptlog "expected MD5 checksum: ${md5}" fn_scriptlog "expected MD5 checksum: ${md5}"
exit 1 exit 1
else else
fn_print_ok_eol_nl fn_print_ok_eol_nl
fn_scriptlog "verifying ${filename} with MD5: OK" fn_scriptlog "verifying ${filename} with MD5: OK"
fn_scriptlog "${filename} returned MD5 checksum: ${md5sumcmd}" fn_scriptlog "${filename} returned MD5 checksum: ${md5sumcmd}"
fn_scriptlog "expected MD5 checksum: ${md5}" fn_scriptlog "expected MD5 checksum: ${md5}"
fi fi
fi fi
} }
# Extracts bzip2 or gzip files # Extracts bzip2 or gzip files
@ -98,7 +98,7 @@ fn_fetch_file(){
if [ ! -d "${filedir}" ]; then if [ ! -d "${filedir}" ]; then
mkdir -p "${filedir}" mkdir -p "${filedir}"
fi fi
# Check curl exists and use available path # Check curl exists and use available path
curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)"
for curlcmd in ${curlpaths} for curlcmd in ${curlpaths}
@ -126,7 +126,7 @@ fn_fetch_file(){
fn_print_fail_eol_nl fn_print_fail_eol_nl
if [ -f "${scriptlog}" ]; then if [ -f "${scriptlog}" ]; then
fn_scriptlog "downloading ${filename}: FAIL" fn_scriptlog "downloading ${filename}: FAIL"
fi fi
echo "${curlcmd}" | tee -a "${scriptlog}" echo "${curlcmd}" | tee -a "${scriptlog}"
echo -e "${fileurl}\n" | tee -a "${scriptlog}" echo -e "${fileurl}\n" | tee -a "${scriptlog}"
exit ${exitcode} exit ${exitcode}
@ -134,10 +134,10 @@ fn_fetch_file(){
fn_print_ok_eol_nl fn_print_ok_eol_nl
if [ -f "${scriptlog}" ]; then if [ -f "${scriptlog}" ]; then
fn_scriptlog "downloading ${filename}: OK" fn_scriptlog "downloading ${filename}: OK"
fi fi
fi fi
# remove trap # remove trap
trap - INT trap - INT
else else
fn_print_fail_eol_nl fn_print_fail_eol_nl
echo "Curl is not installed!" echo "Curl is not installed!"
@ -147,7 +147,7 @@ fn_fetch_file(){
# make file executecmd if executecmd is set # make file executecmd if executecmd is set
if [ "${executecmd}" == "executecmd" ]; then if [ "${executecmd}" == "executecmd" ]; then
chmod +x "${filedir}/${filename}" chmod +x "${filedir}/${filename}"
fi fi
fi fi
if [ -f "${filedir}/${filename}" ]; then if [ -f "${filedir}/${filename}" ]; then

6
lgsm/functions/core_functions.sh

@ -25,7 +25,7 @@ if [ -z "${lgsmdir}" ]; then
lgsmdir="${rootdir}/lgsm" lgsmdir="${rootdir}/lgsm"
functionsdir="${lgsmdir}/functions" functionsdir="${lgsmdir}/functions"
libdir="${lgsmdir}/lib" libdir="${lgsmdir}/lib"
fi fi
fn_fetch_core_dl(){ fn_fetch_core_dl(){
github_file_url_dir="lgsm/functions" github_file_url_dir="lgsm/functions"
@ -57,7 +57,7 @@ if [ ! -f "${filedir}/${filename}" ]; then
exit 1 exit 1
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"
@ -161,7 +161,7 @@ local modulename="Restarting"
info_config.sh info_config.sh
if [ -d "${scriptlogdir}" ]; then if [ -d "${scriptlogdir}" ]; then
fn_scriptlog "${servername}" fn_scriptlog "${servername}"
fi fi
command_stop.sh command_stop.sh
command_start.sh command_start.sh
} }

36
lgsm/functions/core_getopt.sh

@ -65,7 +65,7 @@ case "$getopt" in
echo -e "\e[34mdebug\t\e[0md |See the output of the server directly to your terminal." echo -e "\e[34mdebug\t\e[0md |See the output of the server directly to your terminal."
echo -e "\e[34minstall\t\e[0mi |Install the server." echo -e "\e[34minstall\t\e[0mi |Install the server."
echo -e "\e[34mauto-install\t\e[0mai |Install the server, without prompts." echo -e "\e[34mauto-install\t\e[0mai |Install the server, without prompts."
} | column -s $'\t' -t } | column -s $'\t' -t
esac esac
exit exit
} }
@ -93,7 +93,7 @@ case "$getopt" in
pw|change-password) pw|change-password)
command_ts3_server_pass.sh;; command_ts3_server_pass.sh;;
dev|dev-debug) dev|dev-debug)
command_dev_debug.sh;; command_dev_debug.sh;;
i|install) i|install)
command_install.sh;; command_install.sh;;
ai|auto-install) ai|auto-install)
@ -119,7 +119,7 @@ case "$getopt" in
echo -e "\e[34mbackup\t\e[0mb |Create archive of the server." echo -e "\e[34mbackup\t\e[0mb |Create archive of the server."
echo -e "\e[34minstall\t\e[0mi |Install the server." echo -e "\e[34minstall\t\e[0mi |Install the server."
echo -e "\e[34mauto-install\t\e[0mai |Install the server, without prompts." echo -e "\e[34mauto-install\t\e[0mai |Install the server, without prompts."
} | column -s $'\t' -t } | column -s $'\t' -t
esac esac
exit exit
} }
@ -141,7 +141,7 @@ case "$getopt" in
b|backup) b|backup)
command_backup.sh;; command_backup.sh;;
dev|dev-debug) dev|dev-debug)
command_dev_debug.sh;; command_dev_debug.sh;;
console) console)
command_console.sh;; command_console.sh;;
d|debug) d|debug)
@ -164,7 +164,7 @@ case "$getopt" in
echo -e "\e[34mbackup\t\e[0mb |Create archive of the server." echo -e "\e[34mbackup\t\e[0mb |Create archive of the server."
echo -e "\e[34mconsole\t\e[0mc |Console allows you to access the live view of a server." echo -e "\e[34mconsole\t\e[0mc |Console allows you to access the live view of a server."
echo -e "\e[34mdebug\t\e[0md |See the output of the server directly to your terminal." echo -e "\e[34mdebug\t\e[0md |See the output of the server directly to your terminal."
} | column -s $'\t' -t } | column -s $'\t' -t
esac esac
exit exit
} }
@ -199,7 +199,7 @@ case "$getopt" in
d|debug) d|debug)
command_debug.sh;; command_debug.sh;;
dev|dev-debug) dev|dev-debug)
command_dev_debug.sh;; command_dev_debug.sh;;
i|install) i|install)
command_install.sh;; command_install.sh;;
ai|auto-install) ai|auto-install)
@ -231,7 +231,7 @@ case "$getopt" in
echo -e "\e[34minstall\t\e[0mi |Install the server." echo -e "\e[34minstall\t\e[0mi |Install the server."
echo -e "\e[34mauto-install\t\e[0mai |Install the server, without prompts." echo -e "\e[34mauto-install\t\e[0mai |Install the server, without prompts."
echo -e "\e[34mfastdl\t\e[0mfd |Generates or update a FastDL folder for your server." echo -e "\e[34mfastdl\t\e[0mfd |Generates or update a FastDL folder for your server."
} | column -s $'\t' -t } | column -s $'\t' -t
esac esac
exit exit
} }
@ -259,15 +259,15 @@ case "$getopt" in
d|debug) d|debug)
command_debug.sh;; command_debug.sh;;
dev|dev-debug) dev|dev-debug)
command_dev_debug.sh;; command_dev_debug.sh;;
i|install) i|install)
command_install.sh;; command_install.sh;;
ai|auto-install) ai|auto-install)
fn_autoinstall;; fn_autoinstall;;
mc|map-compressor) mc|map-compressor)
compress_ut99_maps.sh;; compress_ut99_maps.sh;;
dd|depsdetect) dd|depsdetect)
command_dev_detect_deps.sh;; command_dev_detect_deps.sh;;
*) *)
echo "Usage: $0 [option]" echo "Usage: $0 [option]"
echo "${gamename} - Linux Game Server Manager - Version ${version}" echo "${gamename} - Linux Game Server Manager - Version ${version}"
@ -288,7 +288,7 @@ case "$getopt" in
echo -e "\e[34minstall\t\e[0mi |Install the server." echo -e "\e[34minstall\t\e[0mi |Install the server."
echo -e "\e[34mauto-install\t\e[0mai |Install the server, without prompts." echo -e "\e[34mauto-install\t\e[0mai |Install the server, without prompts."
echo -e "\e[34mmap-compressor\t\e[0mmc |Compresses all ${gamename} server maps." echo -e "\e[34mmap-compressor\t\e[0mmc |Compresses all ${gamename} server maps."
} | column -s $'\t' -t } | column -s $'\t' -t
esac esac
exit exit
} }
@ -324,7 +324,7 @@ case "$getopt" in
d|debug) d|debug)
command_debug.sh;; command_debug.sh;;
dev|dev-debug) dev|dev-debug)
command_dev_debug.sh;; command_dev_debug.sh;;
i|install) i|install)
command_install.sh;; command_install.sh;;
ai|auto-install) ai|auto-install)
@ -356,7 +356,7 @@ case "$getopt" in
echo -e "\e[34minstall\t\e[0mi |Install the server." echo -e "\e[34minstall\t\e[0mi |Install the server."
echo -e "\e[34mauto-install\t\e[0mai |Install the server, without prompts." echo -e "\e[34mauto-install\t\e[0mai |Install the server, without prompts."
echo -e "\e[34mmap-compressor\t\e[0mmc |Compresses all ${gamename} server maps." echo -e "\e[34mmap-compressor\t\e[0mmc |Compresses all ${gamename} server maps."
} | column -s $'\t' -t } | column -s $'\t' -t
esac esac
exit exit
} }
@ -385,17 +385,17 @@ case "$getopt" in
d|debug) d|debug)
command_debug.sh;; command_debug.sh;;
dev|dev-debug) dev|dev-debug)
command_dev_debug.sh;; command_dev_debug.sh;;
i|install) i|install)
command_install.sh;; command_install.sh;;
ai|auto-install) ai|auto-install)
fn_autoinstall;; fn_autoinstall;;
cd|server-cd-key) cd|server-cd-key)
install_ut2k4_key.sh;; install_ut2k4_key.sh;;
mc|map-compressor) mc|map-compressor)
compress_unreal2_maps.sh;; compress_unreal2_maps.sh;;
dd|depsdetect) dd|depsdetect)
command_dev_detect_deps.sh;; command_dev_detect_deps.sh;;
*) *)
echo "Usage: $0 [option]" echo "Usage: $0 [option]"
echo "${gamename} - Linux Game Server Manager - Version ${version}" echo "${gamename} - Linux Game Server Manager - Version ${version}"
@ -415,9 +415,9 @@ case "$getopt" in
echo -e "\e[34mdebug\t\e[0md |See the output of the server directly to your terminal." echo -e "\e[34mdebug\t\e[0md |See the output of the server directly to your terminal."
echo -e "\e[34minstall\t\e[0mi |Install the server." echo -e "\e[34minstall\t\e[0mi |Install the server."
echo -e "\e[34mauto-install\t\e[0mai |Install the server, without prompts." echo -e "\e[34mauto-install\t\e[0mai |Install the server, without prompts."
echo -e "\e[34mserver-cd-key\t\e[0mcd |Add your server cd key" echo -e "\e[34mserver-cd-key\t\e[0mcd |Add your server cd key"
echo -e "\e[34mmap-compressor\t\e[0mmc |Compresses all ${gamename} server maps." echo -e "\e[34mmap-compressor\t\e[0mmc |Compresses all ${gamename} server maps."
} | column -s $'\t' -t } | column -s $'\t' -t
esac esac
exit exit
} }

10
lgsm/functions/core_messages.sh

@ -35,9 +35,9 @@ fn_print_fail_nl(){
echo -en "\r\033[K[\e[0;31m FAIL \e[0m] $@" echo -en "\r\033[K[\e[0;31m FAIL \e[0m] $@"
fi fi
sleep 1 sleep 1
echo -en "\n" echo -en "\n"
} }
# [ OK ] # [ OK ]
fn_print_ok(){ fn_print_ok(){
if [ -n "${modulename}" ]; then if [ -n "${modulename}" ]; then
@ -54,7 +54,7 @@ fn_print_ok_nl(){
echo -en "\r\033[K[\e[0;32m OK \e[0m] $@" echo -en "\r\033[K[\e[0;32m OK \e[0m] $@"
fi fi
sleep 1 sleep 1
echo -en "\n" echo -en "\n"
} }
# [ INFO ] # [ INFO ]
@ -73,7 +73,7 @@ fn_print_info_nl(){
echo -en "\r\033[K[\e[0;36m INFO \e[0m] $@" echo -en "\r\033[K[\e[0;36m INFO \e[0m] $@"
fi fi
sleep 1 sleep 1
echo -en "\n" echo -en "\n"
} }
# [ WARN ] # [ WARN ]
@ -92,7 +92,7 @@ fn_print_warn_nl(){
echo -en "\r\033[K[\e[1;33m WARN \e[0m] $@" echo -en "\r\033[K[\e[1;33m WARN \e[0m] $@"
fi fi
sleep 1 sleep 1
echo -en "\n" echo -en "\n"
} }
# [ .... ] # [ .... ]

16
lgsm/functions/fix.sh

@ -23,7 +23,7 @@ fn_fix_msg_end(){
else else
fn_print_ok_nl "Applying ${fixname} fix: ${gamename}" fn_print_ok_nl "Applying ${fixname} fix: ${gamename}"
fn_scriptlog "Complete! Applying ${fixname} fix: ${gamename}" fn_scriptlog "Complete! Applying ${fixname} fix: ${gamename}"
fi fi
} }
@ -31,16 +31,16 @@ fn_fix_msg_end(){
if [ "${function_selfname}" != "command_install.sh" ]; then if [ "${function_selfname}" != "command_install.sh" ]; then
if [ -n "${appid}" ]; then if [ -n "${appid}" ]; then
fix_steamcmd.sh fix_steamcmd.sh
fi fi
if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
fix_csgo.sh fix_csgo.sh
elif [ "${gamename}" == "Don't Starve Together" ]; then elif [ "${gamename}" == "Don't Starve Together" ]; then
fix_dst.sh fix_dst.sh
elif [ "${gamename}" == "Insurgency" ]; then elif [ "${gamename}" == "Insurgency" ]; then
fix_ins.sh fix_ins.sh
elif [ "${gamename}" == "ARMA 3" ]; then elif [ "${gamename}" == "ARMA 3" ]; then
fix_arma3.sh fix_arma3.sh
fi fi
if [ "${gamename}" != "Teamspeak 3" ]; then if [ "${gamename}" != "Teamspeak 3" ]; then
@ -54,25 +54,25 @@ if [ "${function_selfname}" == "command_install.sh" ]; then
echo "" echo ""
echo "Applying ${gamename} Server Fixes" echo "Applying ${gamename} Server Fixes"
echo "=================================" echo "================================="
sleep 1 sleep 1
fix_kf.sh fix_kf.sh
elif [ "${gamename}" == "Red Orchestra: Ostfront 41-45" ]; then elif [ "${gamename}" == "Red Orchestra: Ostfront 41-45" ]; then
echo "" echo ""
echo "Applying ${gamename} Server Fixes" echo "Applying ${gamename} Server Fixes"
echo "=================================" echo "================================="
sleep 1 sleep 1
fix_ro.sh fix_ro.sh
elif [ "${gamename}" == "Unreal Tournament 2004" ]; then elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
echo "" echo ""
echo "Applying ${gamename} Server Fixes" echo "Applying ${gamename} Server Fixes"
echo "=================================" echo "================================="
sleep 1 sleep 1
fix_ut2k4.sh fix_ut2k4.sh
elif [ "${gamename}" == "Unreal Tournament 99" ]; then elif [ "${gamename}" == "Unreal Tournament 99" ]; then
echo "" echo ""
echo "Applying ${gamename} Server Fixes" echo "Applying ${gamename} Server Fixes"
echo "=================================" echo "================================="
sleep 1 sleep 1
fix_ut99.sh fix_ut99.sh
fi fi
fi fi

4
lgsm/functions/fix_glibc.sh

@ -11,7 +11,7 @@ for libstdc_server in "${libstdc_servers_array[@]}"
do do
if [ "${gamename}" == "${libstdc_server}" ]; then if [ "${gamename}" == "${libstdc_server}" ]; then
fn_fetch_file_github "lgsm/lib/ubuntu12.04/i386" "libstdc++.so.6" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5" fn_fetch_file_github "lgsm/lib/ubuntu12.04/i386" "libstdc++.so.6" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5"
fi fi
done done
local libm_servers_array=( "Double Action: Boogaloo" "Fistful of Frags" "Insurgency" "Natural Selection 2" "NS2: Combat" "No More Room in Hell" ) local libm_servers_array=( "Double Action: Boogaloo" "Fistful of Frags" "Insurgency" "Natural Selection 2" "NS2: Combat" "No More Room in Hell" )
@ -19,7 +19,7 @@ for libm_server in "${libm_servers_array[@]}"
do do
if [ "${gamename}" == "${libm_server}" ]; then if [ "${gamename}" == "${libm_server}" ]; then
fn_fetch_file_github "lgsm/lib/ubuntu12.04/i386" "libm.so.6" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5" fn_fetch_file_github "lgsm/lib/ubuntu12.04/i386" "libm.so.6" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5"
fi fi
done done
export LD_LIBRARY_PATH=:"${libdir}" export LD_LIBRARY_PATH=:"${libdir}"

4
lgsm/functions/fix_steamcmd.sh

@ -31,10 +31,10 @@ elif [ "${gamename}" == "Hurtworld" ]; then
fn_fix_msg_start fn_fix_msg_start
cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${filesdir}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${scriptlog}" cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${filesdir}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${scriptlog}"
fn_fix_msg_end fn_fix_msg_end
fi fi
if [ ! -f "${filesdir}/Hurtworld_Data/Plugins/x86_64/steamclient.so" ]; then if [ ! -f "${filesdir}/Hurtworld_Data/Plugins/x86_64/steamclient.so" ]; then
fixname="steamclient.so x86_64" fixname="steamclient.so x86_64"
fn_fix_msg_start fn_fix_msg_start
cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${filesdir}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${scriptlog}" cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${filesdir}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${scriptlog}"
fn_fix_msg_end fn_fix_msg_end
fi fi

38
lgsm/functions/info_config.sh

@ -26,18 +26,18 @@ fn_info_config_avalanche(){
serverpassword=$(grep "Password" "${servercfgfullpath}" | sed 's/Password//g' | tr -d '=", \n') serverpassword=$(grep "Password" "${servercfgfullpath}" | sed 's/Password//g' | tr -d '=", \n')
slots=$(grep "MaxPlayers" "${servercfgfullpath}" | tr -cd '[:digit:]') slots=$(grep "MaxPlayers" "${servercfgfullpath}" | tr -cd '[:digit:]')
port=$(grep "BindPort" "${servercfgfullpath}" | tr -cd '[:digit:]') port=$(grep "BindPort" "${servercfgfullpath}" | tr -cd '[:digit:]')
# Not Set # Not Set
servername=${servername:-"NOT SET"} servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"}
slots=${slots:-"0"} slots=${slots:-"0"}
port=${port:-"0"} port=${port:-"0"}
# check if the ip exists in the config file. Failing this will fall back to the default. # check if the ip exists in the config file. Failing this will fall back to the default.
ipconfigcheck=$(grep "BindIP" "${servercfgfullpath}" | sed 's/BindIP//g' | tr -d '=", \n') ipconfigcheck=$(grep "BindIP" "${servercfgfullpath}" | sed 's/BindIP//g' | tr -d '=", \n')
if [ -n "${ipconfigcheck}" ]; then if [ -n "${ipconfigcheck}" ]; then
ip="${ipconfigcheck}" ip="${ipconfigcheck}"
fi fi
fi fi
} }
@ -56,7 +56,7 @@ fn_info_config_dontstarve(){
gamemode=$(grep "game_mode = " "${servercfgfullpath}" | grep -v "#" | sed 's/game_mode = //g') gamemode=$(grep "game_mode = " "${servercfgfullpath}" | grep -v "#" | sed 's/game_mode = //g')
tickrate=$(grep "tick_rate" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') tickrate=$(grep "tick_rate" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
port=$(grep "server_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') port=$(grep "server_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
# Not Set # Not Set
servername=${servername:-"NOT SET"} servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"}
@ -66,7 +66,7 @@ fn_info_config_dontstarve(){
port=${port:-"0"} port=${port:-"0"}
fi fi
} }
fn_info_config_projectzomboid(){ fn_info_config_projectzomboid(){
if [ ! -f "${servercfgfullpath}" ]; then if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}" servername="${unavailable}"
@ -76,7 +76,7 @@ fn_info_config_projectzomboid(){
servername=$(grep "PublicName=" "${servercfgfullpath}" | sed 's/PublicName=//g' | tr -d '=", \n') servername=$(grep "PublicName=" "${servercfgfullpath}" | sed 's/PublicName=//g' | tr -d '=", \n')
slots=$(grep "MaxPlayers=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') slots=$(grep "MaxPlayers=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
port=$(grep "DefaultPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') port=$(grep "DefaultPort=" "${servercfgfullpath}" | tr -cd '[:digit:]')
# Not Set # Not Set
servername=${servername:-"NOT SET"} servername=${servername:-"NOT SET"}
slots=${slots:-"0"} slots=${slots:-"0"}
@ -93,7 +93,7 @@ fn_info_config_idtech3(){
servername=$(grep "set sv_hostname " "${servercfgfullpath}" | sed 's/set sv_hostname //g' | tr -d '=\"; ') servername=$(grep "set sv_hostname " "${servercfgfullpath}" | sed 's/set sv_hostname //g' | tr -d '=\"; ')
serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed 's/set g_password//g' | tr -d '=\"; '| cut -f1 -d "/") serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed 's/set g_password//g' | tr -d '=\"; '| cut -f1 -d "/")
slots=$(grep "set sv_maxClients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') slots=$(grep "set sv_maxClients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
# Not Set # Not Set
servername=${servername:-"NOT SET"} servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"}
@ -112,7 +112,7 @@ fn_info_config_realvirtuality(){
adminpassword=$(grep "passwordAdmin" "${servercfgfullpath}" | grep -v "//" | sed 's/\passwordAdmin//g' | tr -d '=\"; ') adminpassword=$(grep "passwordAdmin" "${servercfgfullpath}" | grep -v "//" | sed 's/\passwordAdmin//g' | tr -d '=\"; ')
serverpassword=$(grep "password =" "${servercfgfullpath}" | grep -v "//" | sed 's/\password//g' | tr -d '=\"; ') serverpassword=$(grep "password =" "${servercfgfullpath}" | grep -v "//" | sed 's/\password//g' | tr -d '=\"; ')
slots=$(grep "maxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') slots=$(grep "maxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
# Not Set # Not Set
servername=${servername:-"NOT SET"} servername=${servername:-"NOT SET"}
adminpassword=${adminpassword:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"}
@ -134,7 +134,7 @@ fn_info_config_seriousengine35(){
gamemode=$(grep "gam_idGameMode" "${servercfgfullpath}" | grep -v "#" | sed 's/gam_idGameMode//g' | tr -d '=\"; ') gamemode=$(grep "gam_idGameMode" "${servercfgfullpath}" | grep -v "#" | sed 's/gam_idGameMode//g' | tr -d '=\"; ')
slots=$(grep "gam_ctMaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') slots=$(grep "gam_ctMaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
port=$(grep "prj_uwPort" "${servercfgfullpath}" | tr -d '\r' | tr -cd '[:digit:]') port=$(grep "prj_uwPort" "${servercfgfullpath}" | tr -d '\r' | tr -cd '[:digit:]')
# Not Set # Not Set
servername=${servername:-"NOT SET"} servername=${servername:-"NOT SET"}
rconpassword=${rconpassword:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"}
@ -153,7 +153,7 @@ fn_info_config_source(){
servername=$(grep "hostname" "${servercfgfullpath}" | sed 's/hostname //g' | sed 's/"//g') servername=$(grep "hostname" "${servercfgfullpath}" | sed 's/hostname //g' | sed 's/"//g')
serverpassword=$(grep "sv_password" "${servercfgfullpath}" | sed 's/sv_password //g' | sed 's/"//g') serverpassword=$(grep "sv_password" "${servercfgfullpath}" | sed 's/sv_password //g' | sed 's/"//g')
rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed 's/rcon_password //g' | sed 's/"//g') rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed 's/rcon_password //g' | sed 's/"//g')
# Not Set # Not Set
servername=${servername:-"NOT SET"} servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"}
@ -192,20 +192,20 @@ fn_info_config_teeworlds(){
rconpassword="${unavailable}" rconpassword="${unavailable}"
port="8303" port="8303"
slots="12" slots="12"
else else
servername=$(grep "sv_name" "${servercfgfullpath}" | sed 's/sv_name //g' | sed 's/"//g') servername=$(grep "sv_name" "${servercfgfullpath}" | sed 's/sv_name //g' | sed 's/"//g')
serverpassword=$(grep "password " "${servercfgfullpath}" | awk '!/sv_rcon_password/'| sed 's/password //g' | tr -d '=\"; ') serverpassword=$(grep "password " "${servercfgfullpath}" | awk '!/sv_rcon_password/'| sed 's/password //g' | tr -d '=\"; ')
rconpassword=$(grep "sv_rcon_password" "${servercfgfullpath}" | sed 's/sv_rcon_password //g' | tr -d '=\"; ') rconpassword=$(grep "sv_rcon_password" "${servercfgfullpath}" | sed 's/sv_rcon_password //g' | tr -d '=\"; ')
port=$(grep "sv_port" "${servercfgfullpath}" | tr -cd '[:digit:]') port=$(grep "sv_port" "${servercfgfullpath}" | tr -cd '[:digit:]')
slots=$(grep "sv_max_clients" "${servercfgfullpath}" | tr -cd '[:digit:]') slots=$(grep "sv_max_clients" "${servercfgfullpath}" | tr -cd '[:digit:]')
# Not Set # Not Set
servername=${servername:-"NOT SET"} servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"}
rconpassword=${rconpassword:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"}
port=${port:-"8303"} port=${port:-"8303"}
slots=${slots:-"12"} slots=${slots:-"12"}
fi fi
} }
fn_info_config_terraria(){ fn_info_config_terraria(){
@ -214,7 +214,7 @@ fn_info_config_terraria(){
port="${zero}" port="${zero}"
gameworld="${unavailable}" gameworld="${unavailable}"
slots="${zero}" slots="${zero}"
else else
servername=$(grep "worldname=" "${servercfgfullpath}" | sed 's/worldname=//g') servername=$(grep "worldname=" "${servercfgfullpath}" | sed 's/worldname=//g')
port=$(grep "port=" "${servercfgfullpath}" | tr -cd '[:digit:]') port=$(grep "port=" "${servercfgfullpath}" | tr -cd '[:digit:]')
gameworld=$(grep "world=" "${servercfgfullpath}" | sed 's/world=//g') gameworld=$(grep "world=" "${servercfgfullpath}" | sed 's/world=//g')
@ -265,7 +265,7 @@ fn_info_config_unreal(){
webadminport=${webadminport:-"0"} webadminport=${webadminport:-"0"}
webadminuser=${webadminuser:-"NOT SET"} webadminuser=${webadminuser:-"NOT SET"}
webadminpass=${webadminpass:-"NOT SET"} webadminpass=${webadminpass:-"NOT SET"}
fi fi
} }
## Just Cause 2 ## Just Cause 2
@ -280,13 +280,13 @@ elif [ "${engine}" == "projectzomboid" ]; then
# Quake Love # Quake Love
elif [ "${engine}" == "idtech3" ]; then elif [ "${engine}" == "idtech3" ]; then
fn_info_config_idtech3 fn_info_config_idtech3
# ARMA 3 # ARMA 3
elif [ "${engine}" == "realvirtuality" ]; then elif [ "${engine}" == "realvirtuality" ]; then
fn_info_config_realvirtuality fn_info_config_realvirtuality
# Serious Sam # Serious Sam
elif [ "${engine}" == "seriousengine35" ]; then elif [ "${engine}" == "seriousengine35" ]; then
fn_info_config_seriousengine35 fn_info_config_seriousengine35
# Source Engine Games # Source Engine Games
elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
fn_info_config_source fn_info_config_source
elif [ "${gamename}" == "Teamspeak 3" ]; then elif [ "${gamename}" == "Teamspeak 3" ]; then
@ -297,7 +297,7 @@ elif [ "${engine}" == "teeworlds" ]; then
# Terraria # Terraria
elif [ "${engine}" == "terraria" ]; then elif [ "${engine}" == "terraria" ]; then
fn_info_config_terraria fn_info_config_terraria
# Unreal/Unreal 2 engine # Unreal/Unreal 2 engine
elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
fn_info_config_unreal fn_info_config_unreal
fi fi

6
lgsm/functions/info_glibc.sh

@ -55,10 +55,10 @@ elif [ "${engine}" == "starbound" ]; then
glibcfix="no" glibcfix="no"
elif [ "${engine}" == "terraria" ]; then elif [ "${engine}" == "terraria" ]; then
glibcrequired="2.7" glibcrequired="2.7"
glibcfix="no" glibcfix="no"
elif [ "${engine}" == "unreal" ]; then elif [ "${engine}" == "unreal" ]; then
glibcrequired="2.1" glibcrequired="2.1"
glibcfix="no" glibcfix="no"
elif [ "${engine}" == "unreal2" ]; then elif [ "${engine}" == "unreal2" ]; then
glibcrequired="2.4" glibcrequired="2.4"
glibcfix="no" glibcfix="no"
@ -70,7 +70,7 @@ elif [ "${engine}" == "unity3d" ]; then
glibcfix="no" glibcfix="no"
elif [ "${gamename}" == "Teamspeak 3" ]; then elif [ "${gamename}" == "Teamspeak 3" ]; then
glibcrequired="NOT REQUIRED" glibcrequired="NOT REQUIRED"
glibcfix="no" glibcfix="no"
else else
glibcrequired="UNKNOWN" glibcrequired="UNKNOWN"
glibcfix="no" glibcfix="no"

20
lgsm/functions/info_parms.sh

@ -70,29 +70,29 @@ fn_info_config_teeworlds(){
rconpassword="${unavailable}" rconpassword="${unavailable}"
port="8303" port="8303"
slots="12" slots="12"
else else
servername=$(grep "sv_name" "${servercfgfullpath}" | sed 's/sv_name //g' | sed 's/"//g') servername=$(grep "sv_name" "${servercfgfullpath}" | sed 's/sv_name //g' | sed 's/"//g')
serverpassword=$(grep "password " "${servercfgfullpath}" | awk '!/sv_rcon_password/'| sed 's/password //g' | tr -d '=\"; ') serverpassword=$(grep "password " "${servercfgfullpath}" | awk '!/sv_rcon_password/'| sed 's/password //g' | tr -d '=\"; ')
rconpassword=$(grep "sv_rcon_password" "${servercfgfullpath}" | sed 's/sv_rcon_password //g' | tr -d '=\"; ') rconpassword=$(grep "sv_rcon_password" "${servercfgfullpath}" | sed 's/sv_rcon_password //g' | tr -d '=\"; ')
port=$(grep "sv_port" "${servercfgfullpath}" | tr -cd '[:digit:]') port=$(grep "sv_port" "${servercfgfullpath}" | tr -cd '[:digit:]')
slots=$(grep "sv_max_clients" "${servercfgfullpath}" | tr -cd '[:digit:]') slots=$(grep "sv_max_clients" "${servercfgfullpath}" | tr -cd '[:digit:]')
# Not Set # Not Set
servername=${servername:-"NOT SET"} servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"}
rconpassword=${rconpassword:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"}
port=${port:-"8303"} port=${port:-"8303"}
slots=${slots:-"12"} slots=${slots:-"12"}
fi fi
} }
fn_info_config_terraria(){ fn_info_config_terraria(){
if [ ! -f "${servercfgfullpath}" ]; then if [ ! -f "${servercfgfullpath}" ]; then
port="0" port="0"
else else
port=$(grep "port=" "${servercfgfullpath}" | tr -cd '[:digit:]') port=$(grep "port=" "${servercfgfullpath}" | tr -cd '[:digit:]')
# Not Set # Not Set
port=${port:-"0"} port=${port:-"0"}
fi fi
} }
@ -134,7 +134,7 @@ fn_info_config_unreal(){
webadminport=${webadminport:-"NOT SET"} webadminport=${webadminport:-"NOT SET"}
webadminuser=${webadminuser:-"NOT SET"} webadminuser=${webadminuser:-"NOT SET"}
webadminpass=${webadminpass:-"NOT SET"} webadminpass=${webadminpass:-"NOT SET"}
fi fi
} }
## Just Cause 2 ## Just Cause 2
@ -149,13 +149,13 @@ elif [ "${engine}" == "projectzomboid" ]; then
# Quake Live # Quake Live
elif [ "${engine}" == "idtech3" ]; then elif [ "${engine}" == "idtech3" ]; then
fn_info_config_idtech3 fn_info_config_idtech3
# ARMA 3 # ARMA 3
elif [ "${engine}" == "realvirtuality" ]; then elif [ "${engine}" == "realvirtuality" ]; then
fn_info_config_realvirtuality fn_info_config_realvirtuality
# Serious Sam # Serious Sam
elif [ "${engine}" == "seriousengine35" ]; then elif [ "${engine}" == "seriousengine35" ]; then
fn_info_config_seriousengine35 fn_info_config_seriousengine35
# Source Engine Games # Source Engine Games
elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
fn_info_config_source fn_info_config_source
elif [ "${gamename}" == "Teamspeak 3" ]; then elif [ "${gamename}" == "Teamspeak 3" ]; then
@ -165,7 +165,7 @@ elif [ "${engine}" == "teeworlds" ]; then
fn_info_config_teeworlds fn_info_config_teeworlds
elif [ "${engine}" == "terraria" ]; then elif [ "${engine}" == "terraria" ]; then
fn_info_config_terraria fn_info_config_terraria
# Unreal/Unreal 2 engine # Unreal/Unreal 2 engine
elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
fn_info_config_unreal fn_info_config_unreal
fi fi

6
lgsm/functions/install_config.sh

@ -171,7 +171,7 @@ elif [ "${gamename}" == "BrainBread 2" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N /dev/null ${githuburl}/BrainBread2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N /dev/null ${githuburl}/BrainBread2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_sourceconfig fn_sourceconfig
elif [ "${gamename}" == "Black Mesa: Deathmatch" ]; then elif [ "${gamename}" == "Black Mesa: Deathmatch" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N /dev/null ${githuburl}/BlackMesa/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N /dev/null ${githuburl}/BlackMesa/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
@ -241,7 +241,7 @@ elif [ "${gamename}" == "GoldenEye: Source" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N /dev/null ${githuburl}/GoldenEyeSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N /dev/null ${githuburl}/GoldenEyeSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_sourceconfig fn_sourceconfig
elif [ "${gamename}" == "Half Life 2: Deathmatch" ]; then elif [ "${gamename}" == "Half Life 2: Deathmatch" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N /dev/null ${githuburl}/HalfLife2Deathmatch/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N /dev/null ${githuburl}/HalfLife2Deathmatch/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
@ -289,7 +289,7 @@ elif [ "${gamename}" == "Project Zomboid" ]; then
echo -e "downloading lgsm-default.ini...\c" echo -e "downloading lgsm-default.ini...\c"
wget -N /dev/null ${githuburl}/ProjectZomboid/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N /dev/null ${githuburl}/ProjectZomboid/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_defaultconfig fn_defaultconfig
elif [ "${gamename}" == "Quake Live" ]; then elif [ "${gamename}" == "Quake Live" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N /dev/null ${githuburl}/QuakeLive/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N /dev/null ${githuburl}/QuakeLive/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq

2
lgsm/functions/install_server_dir.sh

@ -16,7 +16,7 @@ echo ""
if [ -d "${filesdir}" ]; then if [ -d "${filesdir}" ]; then
fn_print_warning_nl "A server is already installed here." fn_print_warning_nl "A server is already installed here."
fi fi
if [ -z "${autoinstall}" ]; then if [ -z "${autoinstall}" ]; then
while true; do while true; do
read -e -i "y" -p "Continue [Y/n]" yn read -e -i "y" -p "Continue [Y/n]" yn
case $yn in case $yn in

2
lgsm/functions/install_ts3db.sh

@ -36,7 +36,7 @@ fn_install_ts3db_mariadb(){
echo "username='${mariausername}'" >> ${servercfgdir}/ts3db_mariadb.ini echo "username='${mariausername}'" >> ${servercfgdir}/ts3db_mariadb.ini
echo "password='${mariapassword}'" >> ${servercfgdir}/ts3db_mariadb.ini echo "password='${mariapassword}'" >> ${servercfgdir}/ts3db_mariadb.ini
echo "database='${mariadbname}'" >> ${servercfgdir}/ts3db_mariadb.ini echo "database='${mariadbname}'" >> ${servercfgdir}/ts3db_mariadb.ini
echo "socket=" >> ${servercfgdir}/ts3db_mariadb.ini echo "socket=" >> ${servercfgdir}/ts3db_mariadb.ini
sed -i "s/dbplugin=ts3db_sqlite3/dbplugin=ts3db_mariadb/g" "${servercfgfullpath}" sed -i "s/dbplugin=ts3db_sqlite3/dbplugin=ts3db_mariadb/g" "${servercfgfullpath}"
sed -i "s/dbpluginparameter=/dbpluginparameter=ts3db_mariadb.ini/g" "${servercfgfullpath}" sed -i "s/dbpluginparameter=/dbpluginparameter=ts3db_mariadb.ini/g" "${servercfgfullpath}"
sed -i "s/dbsqlcreatepath=create_sqlite\//dbsqlcreatepath=create_mariadb\//g" "${servercfgfullpath}" sed -i "s/dbsqlcreatepath=create_sqlite\//dbsqlcreatepath=create_mariadb\//g" "${servercfgfullpath}"

4
lgsm/functions/install_ut2k4_key.sh

@ -21,9 +21,9 @@ if [ -z "${autoinstall}" ]; then
echo ""\""CDKey"\""="\""${CODE}"\""" > "${systemdir}/cdkey" echo ""\""CDKey"\""="\""${CODE}"\""" > "${systemdir}/cdkey"
if [ -f "${systemdir}/cdkey" ]; then if [ -f "${systemdir}/cdkey" ]; then
fn_scriptlog "UT2K4 Server CD Key created" fn_scriptlog "UT2K4 Server CD Key created"
fi fi
else else
echo "You can add your key using the following command" echo "You can add your key using the following command"
echo "./${selfname} server-cd-key" echo "./${selfname} server-cd-key"
fi fi
echo "" echo ""

2
lgsm/functions/logs.sh

@ -93,7 +93,7 @@ if [ $(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l) -ne "0" ]; th
rm -rf "${legacyserverlogdir}" rm -rf "${legacyserverlogdir}"
fi fi
fi fi
# Count total amount of files removed # Count total amount of files removed
count=$((${scriptcount} + ${consolecount} + ${gamecount} + ${srcdscount} + ${smcount} + ${ulxcount} + ${darkrpcount} + ${legacycount})) count=$((${scriptcount} + ${consolecount} + ${gamecount} + ${srcdscount} + ${smcount} + ${ulxcount} + ${darkrpcount} + ${legacycount}))
# Job done # Job done

6
lgsm/functions/monitor_gsquery.sh

@ -12,14 +12,14 @@ local modulename="Monitor"
# Forces legecy servers to use gsquery # Forces legecy servers to use gsquery
if [ -z "${gsquery}" ]; then if [ -z "${gsquery}" ]; then
gsquery="yes" gsquery="yes"
fi fi
if [ "${gsquery}" == "yes" ]; then if [ "${gsquery}" == "yes" ]; then
# Downloads gsquery.py if missing # Downloads gsquery.py if missing
if [ ! -f "${functionsdir}/gsquery.py" ]; then if [ ! -f "${functionsdir}/gsquery.py" ]; then
fn_fetch_file_github "lgsm/functions" "gsquery.py" "${functionsdir}" "executecmd" "norun" "noforce" "nomd5" fn_fetch_file_github "lgsm/functions" "gsquery.py" "${functionsdir}" "executecmd" "norun" "noforce" "nomd5"
fi fi
info_config.sh info_config.sh
@ -45,7 +45,7 @@ if [ "${gsquery}" == "yes" ]; then
fn_print_dots "Querying port: ${ip}:${port} : ${totalseconds}/${queryattempt} : " fn_print_dots "Querying port: ${ip}:${port} : ${totalseconds}/${queryattempt} : "
fn_print_querying_eol fn_print_querying_eol
fn_scriptlog "Querying port: ${ip}:${port} : ${queryattempt} : QUERYING" fn_scriptlog "Querying port: ${ip}:${port} : ${queryattempt} : QUERYING"
gsquerycmd=$("${functionsdir}"/gsquery.py -a "${ip}" -p "${port}" -e "${engine}" 2>&1) gsquerycmd=$("${functionsdir}"/gsquery.py -a "${ip}" -p "${port}" -e "${engine}" 2>&1)
exitcode=$? exitcode=$?

10
lgsm/functions/update_check.sh

@ -90,7 +90,7 @@ fn_logupdaterequest(){
echo -ne "\n" echo -ne "\n"
unset updateonstart unset updateonstart
check_status.sh check_status.sh
if [ "${status}" != "0" ]; then if [ "${status}" != "0" ]; then
command_stop.sh command_stop.sh
update_dl.sh update_dl.sh
@ -99,7 +99,7 @@ fn_logupdaterequest(){
update_dl.sh update_dl.sh
fi fi
alert="update" alert="update"
alert.sh alert.sh
else else
fn_print_ok "Checking for update: Server logs: No update requested" fn_print_ok "Checking for update: Server logs: No update requested"
sleep 1 sleep 1
@ -234,7 +234,7 @@ fn_teamspeak3_check(){
fn_print_failure "${arch} is an unsupported architecture" fn_print_failure "${arch} is an unsupported architecture"
exit 1 exit 1
fi fi
# Gets availablebuild info # Gets availablebuild info
# Grabs all version numbers but not in correct order # Grabs all version numbers but not in correct order
@ -295,7 +295,7 @@ fn_teamspeak3_check(){
fn_scriptlog "Current build: ${currentbuild}" fn_scriptlog "Current build: ${currentbuild}"
fn_scriptlog "Available build: ${availablebuild}" fn_scriptlog "Available build: ${availablebuild}"
fn_scriptlog "${currentbuild} > ${availablebuild}" fn_scriptlog "${currentbuild} > ${availablebuild}"
unset updateonstart unset updateonstart
check_status.sh check_status.sh
if [ "${status}" == "0" ]; then if [ "${status}" == "0" ]; then
@ -309,7 +309,7 @@ fn_teamspeak3_check(){
command_start.sh command_start.sh
fi fi
alert="update" alert="update"
alert.sh alert.sh
else else
echo -e "\n" echo -e "\n"
echo -e "No update available:" echo -e "No update available:"

12
tests/tests_jc2server.sh

@ -85,7 +85,7 @@ if [ ! -f "${filepath}" ]; then
echo -e " fetching ${filename}...\c" echo -e " fetching ${filename}...\c"
if [ "$(command -v curl)" ]||[ "$(which curl >/dev/null 2>&1)" ]||[ -f "/usr/bin/curl" ]||[ -f "/bin/curl" ]; then if [ "$(command -v curl)" ]||[ "$(which curl >/dev/null 2>&1)" ]||[ -f "/usr/bin/curl" ]||[ -f "/bin/curl" ]; then
: :
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"
echo -e "" echo -e ""
@ -99,7 +99,7 @@ if [ ! -f "${filepath}" ]; then
exit exit
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
if [ "${exec}" ]; then if [ "${exec}" ]; then
chmod +x "${filepath}" chmod +x "${filepath}"
fi fi
@ -126,7 +126,7 @@ pid=$(tmux list-sessions 2>&1 | awk '{print $1}' | grep -Ec "^${servicename}:")
if [ "${pid}" != "0" ]; then if [ "${pid}" != "0" ]; then
currentstatus="ONLINE" currentstatus="ONLINE"
else else
currentstatus="OFFLINE" currentstatus="OFFLINE"
fi fi
} }
@ -136,10 +136,10 @@ ts3status=$(${executable} status servercfgfullpathfile=${servercfgfullpath})
if [ "${ts3status}" == "Server is running" ]; then if [ "${ts3status}" == "Server is running" ]; then
currentstatus="ONLINE" currentstatus="ONLINE"
else else
currentstatus="OFFLINE" currentstatus="OFFLINE"
fi fi
} }
fn_setstatus(){ fn_setstatus(){
fn_currentstatus_tmux fn_currentstatus_tmux
echo"" echo""
@ -150,7 +150,7 @@ fn_setstatus(){
counter=$((counter+1)) counter=$((counter+1))
fn_currentstatus_tmux fn_currentstatus_tmux
echo -ne "New status: ${currentstatus}\\r" echo -ne "New status: ${currentstatus}\\r"
if [ "${requiredstatus}" == "ONLINE" ]; then if [ "${requiredstatus}" == "ONLINE" ]; then
(command_start.sh > /dev/null 2>&1) (command_start.sh > /dev/null 2>&1)
else else

12
tests/tests_ts3server.sh

@ -72,7 +72,7 @@ if [ ! -f "${filepath}" ]; then
echo -e " fetching ${filename}...\c" echo -e " fetching ${filename}...\c"
if [ "$(command -v curl)" ]||[ "$(which curl >/dev/null 2>&1)" ]||[ -f "/usr/bin/curl" ]||[ -f "/bin/curl" ]; then if [ "$(command -v curl)" ]||[ "$(which curl >/dev/null 2>&1)" ]||[ -f "/usr/bin/curl" ]||[ -f "/bin/curl" ]; then
: :
else else
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"
echo -e "" echo -e ""
@ -86,7 +86,7 @@ if [ ! -f "${filepath}" ]; then
exit exit
else else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
if [ "${exec}" ]; then if [ "${exec}" ]; then
chmod +x "${filepath}" chmod +x "${filepath}"
fi fi
@ -113,7 +113,7 @@ fn_currentstatus_tmux(){
if [ "${status}" != "0" ]; then if [ "${status}" != "0" ]; then
currentstatus="ONLINE" currentstatus="ONLINE"
else else
currentstatus="OFFLINE" currentstatus="OFFLINE"
fi fi
} }
@ -122,10 +122,10 @@ check_status.sh
if [ "${status}" != "0" ]; then if [ "${status}" != "0" ]; then
currentstatus="ONLINE" currentstatus="ONLINE"
else else
currentstatus="OFFLINE" currentstatus="OFFLINE"
fi fi
} }
fn_setstatus(){ fn_setstatus(){
fn_currentstatus_ts3 fn_currentstatus_ts3
echo"" echo""
@ -136,7 +136,7 @@ fn_setstatus(){
counter=$((counter+1)) counter=$((counter+1))
fn_currentstatus_ts3 fn_currentstatus_ts3
echo -ne "New status: ${currentstatus}\\r" echo -ne "New status: ${currentstatus}\\r"
if [ "${requiredstatus}" == "ONLINE" ]; then if [ "${requiredstatus}" == "ONLINE" ]; then
(command_start.sh) (command_start.sh)
else else

Loading…
Cancel
Save