fix.sh 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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}" == "ARMA 3" ]; then
  33. fix_arma3.sh
  34. elif [ "${gamename}" == "Counter-Strike: Global Offensive" ]; then
  35. fix_csgo.sh
  36. elif [ "${gamename}" == "Don't Starve Together" ]; then
  37. fix_dst.sh
  38. elif [ "${gamename}" == "GoldenEye: Source" ]; then
  39. fix_ges.sh
  40. elif [ "${gamename}" == "Insurgency" ]; then
  41. fix_ins.sh
  42. elif [ "${gamename}" == "Rust" ]; then
  43. fix_rust.sh
  44. fi
  45. fi
  46. # Fixes that are run on install only.
  47. if [ "${function_selfname}" == "command_install.sh" ]; then
  48. if [ "${gamename}" == "Killing Floor" ]; then
  49. echo ""
  50. echo "Applying ${gamename} Server Fixes"
  51. echo "================================="
  52. sleep 1
  53. fix_kf.sh
  54. elif [ "${gamename}" == "Red Orchestra: Ostfront 41-45" ]; then
  55. echo ""
  56. echo "Applying ${gamename} Server Fixes"
  57. echo "================================="
  58. sleep 1
  59. fix_ro.sh
  60. elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
  61. echo ""
  62. echo "Applying ${gamename} Server Fixes"
  63. echo "================================="
  64. sleep 1
  65. fix_ut2k4.sh
  66. elif [ "${gamename}" == "Unreal Tournament" ]; then
  67. echo ""
  68. echo "Applying ${gamename} Server Fixes"
  69. echo "================================="
  70. sleep 1
  71. fix_ut.sh
  72. fi
  73. fi