fix.sh 2.0 KB

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