check.sh 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/bin/bash
  2. # LGSM fn_check function
  3. # Author: Daniel Gibbs
  4. # Website: http://gameservermanagers.com
  5. lgsm_version="060316"
  6. # Description: Overall function for managing checks.
  7. # Runs checks that will either halt on or fix an issue.
  8. # Every command that requires checks just references check.sh
  9. # check.sh selects which checks to run by using arrays
  10. check_root.sh
  11. if [ "${function_selfname}" != "command_install.sh" ] && [ "${function_selfname}" != "command_update_functions.sh" ]; then
  12. check_system_dir.sh
  13. fi
  14. local allowed_commands_array=( command_backup.sh command_console.sh command_debug.sh command_details.sh command_unreal2_maps.sh command_ut99_maps.sh command_monitor.sh command_start.sh command_stop.sh update_check.sh command_validate.sh command_update_functions.sh command_email_test.sh )
  15. for allowed_command in "${allowed_commands_array[@]}"
  16. do
  17. if [ "${allowed_command}" == "${function_selfname}" ]; then
  18. check_logs.sh
  19. fi
  20. done
  21. local allowed_commands_array=( command_debug.sh command_start.sh command_stop.sh )
  22. for allowed_command in "${allowed_commands_array[@]}"
  23. do
  24. if [ "${allowed_command}" == "${function_selfname}" ]; then
  25. check_deps.sh
  26. fi
  27. done
  28. local allowed_commands_array=( command_debug.sh command_details.sh command_monitor.sh command_start.sh command_stop.sh )
  29. for allowed_command in "${allowed_commands_array[@]}"
  30. do
  31. if [ "${allowed_command}" == "${function_selfname}" ]; then
  32. check_ip.sh
  33. fi
  34. done
  35. local allowed_commands_array=( update_check.sh command_debug.sh command_start.sh command_validate.sh )
  36. for allowed_command in "${allowed_commands_array[@]}"
  37. do
  38. if [ "${allowed_command}" == "${function_selfname}" ]; then
  39. if [ -n "${appid}" ]; then
  40. check_steamcmd.sh
  41. fi
  42. fi
  43. done
  44. local allowed_commands_array=( command_console.sh command_start.sh )
  45. for allowed_command in "${allowed_commands_array[@]}"
  46. do
  47. if [ "${allowed_command}" == "${function_selfname}" ]; then
  48. check_tmux.sh
  49. fi
  50. done
  51. local allowed_commands_array=( command_console.sh command_debug.sh command_details.sh command_monitor.sh command_start.sh command_stop.sh )
  52. for allowed_command in "${allowed_commands_array[@]}"
  53. do
  54. if [ "${allowed_command}" == "${function_selfname}" ]; then
  55. check_config.sh
  56. fi
  57. done