fix.sh 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. elif [ "${gamename}" == "Multi Theft Auto" ]; then
  45. fix_mta.sh
  46. fi
  47. fi
  48. # Fixes that are run on install only.
  49. if [ "${function_selfname}" == "command_install.sh" ]; then
  50. if [ "${gamename}" == "Killing Floor" ]; then
  51. echo ""
  52. echo "Applying ${gamename} Server Fixes"
  53. echo "================================="
  54. sleep 1
  55. fix_kf.sh
  56. elif [ "${gamename}" == "Red Orchestra: Ostfront 41-45" ]; then
  57. echo ""
  58. echo "Applying ${gamename} Server Fixes"
  59. echo "================================="
  60. sleep 1
  61. fix_ro.sh
  62. elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
  63. echo ""
  64. echo "Applying ${gamename} Server Fixes"
  65. echo "================================="
  66. sleep 1
  67. fix_ut2k4.sh
  68. elif [ "${gamename}" == "Unreal Tournament" ]; then
  69. echo ""
  70. echo "Applying ${gamename} Server Fixes"
  71. echo "================================="
  72. sleep 1
  73. fix_ut.sh
  74. fi
  75. fi