fix.sh 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #!/bin/bash
  2. # LGSM fix.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://gameservermanagers.com
  5. # Description: Overall function for managing fixes.
  6. # Runs functions that will fix an issue.
  7. local commandname="FIX"
  8. local commandaction="Fix"
  9. # Messages that are displayed for some fixes
  10. fn_fix_msg_start(){
  11. fn_print_dots "Applying ${fixname} fix: ${gamename}"
  12. sleep 1
  13. fn_print_info "Applying ${fixname} fix: ${gamename}"
  14. fn_script_log_info "Applying ${fixname} fix: ${gamename}"
  15. sleep 1
  16. }
  17. fn_fix_msg_end(){
  18. if [ $? -ne 0 ]; then
  19. fn_print_error_nl "Applying ${fixname} fix: ${gamename}"
  20. fn_script_log_error "Applying ${fixname} fix: ${gamename}"
  21. exitcode=2
  22. else
  23. fn_print_ok_nl "Applying ${fixname} fix: ${gamename}"
  24. fn_script_log_pass "Applying ${fixname} fix: ${gamename}"
  25. fi
  26. }
  27. # Fixes that are run on start
  28. if [ "${function_selfname}" != "command_install.sh" ]; then
  29. if [ -n "${appid}" ]; then
  30. fix_steamcmd.sh
  31. fi
  32. if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
  33. fix_csgo.sh
  34. elif [ "${gamename}" == "Don't Starve Together" ]; then
  35. fix_dst.sh
  36. elif [ "${gamename}" == "Insurgency" ]; then
  37. fix_ins.sh
  38. elif [ "${gamename}" == "ARMA 3" ]; then
  39. fix_arma3.sh
  40. fi
  41. # fix_glibc.sh is run though check_glibc.sh
  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