fix.sh 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #!/bin/bash
  2. # LGSM fix.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://gameservermanagers.com
  5. lgsm_version="210516"
  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_script_log_info "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_script_log_error "Failure! Applying ${fixname} fix: ${gamename}"
  20. exitcode=2
  21. else
  22. fn_print_ok_nl "Applying ${fixname} fix: ${gamename}"
  23. fn_script_log_pass "Complete! Applying ${fixname} fix: ${gamename}"
  24. fi
  25. }
  26. # Fixes that are run on start
  27. if [ "${function_selfname}" != "command_install.sh" ]; then
  28. if [ -n "${appid}" ]; then
  29. fix_steamcmd.sh
  30. fi
  31. if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
  32. fix_csgo.sh
  33. elif [ "${gamename}" == "Don't Starve Together" ]; then
  34. fix_dst.sh
  35. elif [ "${gamename}" == "Insurgency" ]; then
  36. fix_ins.sh
  37. elif [ "${gamename}" == "ARMA 3" ]; then
  38. fix_arma3.sh
  39. fi
  40. if [ "${gamename}" != "Teamspeak 3" ]; then
  41. fix_glibc.sh
  42. fi
  43. fi
  44. # Fixes that are run on install only.
  45. if [ "${function_selfname}" == "command_install.sh" ]; then
  46. if [ "${gamename}" == "Killing Floor" ]; then
  47. echo ""
  48. echo "Applying ${gamename} Server Fixes"
  49. echo "================================="
  50. sleep 1
  51. fix_kf.sh
  52. elif [ "${gamename}" == "Red Orchestra: Ostfront 41-45" ]; then
  53. echo ""
  54. echo "Applying ${gamename} Server Fixes"
  55. echo "================================="
  56. sleep 1
  57. fix_ro.sh
  58. elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
  59. echo ""
  60. echo "Applying ${gamename} Server Fixes"
  61. echo "================================="
  62. sleep 1
  63. fix_ut2k4.sh
  64. elif [ "${gamename}" == "Unreal Tournament 99" ]; then
  65. echo ""
  66. echo "Applying ${gamename} Server Fixes"
  67. echo "================================="
  68. sleep 1
  69. fix_ut99.sh
  70. fi
  71. fi