fix.sh 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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 [ -n "${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. fix_glibc.sh
  40. fi
  41. # Fixes that are run on install only.
  42. if [ "${function_selfname}" == "command_install.sh" ]; then
  43. fix_glibc.sh
  44. if [ "${gamename}" == "Killing Floor" ]; then
  45. echo ""
  46. echo "Applying ${gamename} Server Fixes"
  47. echo "================================="
  48. sleep 1
  49. fix_kf.sh
  50. elif [ "${gamename}" == "Red Orchestra: Ostfront 41-45" ]; then
  51. echo ""
  52. echo "Applying ${gamename} Server Fixes"
  53. echo "================================="
  54. sleep 1
  55. fix_ro.sh
  56. elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
  57. echo ""
  58. echo "Applying ${gamename} Server Fixes"
  59. echo "================================="
  60. sleep 1
  61. fix_ut2k4.sh
  62. elif [ "${gamename}" == "Unreal Tournament 99" ]; then
  63. echo ""
  64. echo "Applying ${gamename} Server Fixes"
  65. echo "================================="
  66. sleep 1
  67. fix_ut99.sh
  68. fi
  69. fi