fix.sh 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #!/bin/bash
  2. # LGSM fix.sh function
  3. # Author: Daniel Gibbs
  4. # Website: http://gameservermanagers.com
  5. lgsm_version="010316"
  6. # Description: Overall function for managing fixes.
  7. # Runs functions that will fix an issue.
  8. # Messages that are displayed for some fixes
  9. fn_fix_msg_start(){
  10. fn_print_dots "Applying ${fixname} fix: ${gamename}"
  11. sleep 1
  12. fn_print_info "Applying ${fixname} fix: ${gamename}"
  13. fn_scriptlog "Applying ${fixname} fix: ${gamename}"
  14. sleep 1
  15. }
  16. fn_fix_msg_end(){
  17. if [ $? -ne 0 ]; then
  18. fn_print_fail_nl "Applying ${fixname} fix: ${gamename}"
  19. fn_scriptlog "Failure! Applying ${fixname} fix: ${gamename}"
  20. else
  21. fn_print_ok_nl "Applying ${fixname} fix: ${gamename}"
  22. fn_scriptlog "Complete! Applying ${fixname} fix: ${gamename}"
  23. fi
  24. }
  25. # Fixes that are run on start
  26. if [ "${function_selfname}" != "command_install.sh" ]; then
  27. if [ ! -z "${appid}" ]; then
  28. fix_steamcmd.sh
  29. fi
  30. if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
  31. fix_csgo.sh
  32. elif [ "${gamename}" == "Don't Starve Together" ]; then
  33. fix_dst.sh
  34. elif [ "${gamename}" == "Insurgency" ]; then
  35. fix_ins.sh
  36. elif [ "${gamename}" == "ARMA 3" ]; then
  37. fix_arma3.sh
  38. fi
  39. fi
  40. # Fixes that are run on install only.
  41. if [ "${function_selfname}" == "command_install.sh" ]; then
  42. fix_glibc.sh
  43. if [ "${gamename}" == "Killing Floor" ]; then
  44. echo ""
  45. echo "Applying ${gamename} Server Fixes"
  46. echo "================================="
  47. sleep 1
  48. fix_kf.sh
  49. elif [ "${gamename}" == "Red Orchestra: Ostfront 41-45" ]; then
  50. echo ""
  51. echo "Applying ${gamename} Server Fixes"
  52. echo "================================="
  53. sleep 1
  54. fix_ro.sh
  55. elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
  56. echo ""
  57. echo "Applying ${gamename} Server Fixes"
  58. echo "================================="
  59. sleep 1
  60. fix_ut2k4.sh
  61. elif [ "${gamename}" == "Unreal Tournament 99" ]; then
  62. echo ""
  63. echo "Applying ${gamename} Server Fixes"
  64. echo "================================="
  65. sleep 1
  66. fix_ut99.sh
  67. fi
  68. fi