check.sh 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #!/bin/bash
  2. # LGSM fn_check function
  3. # Author: Daniel Gibbs
  4. # Website: http://gameservermanagers.com
  5. lgsm_version="060516"
  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. check_permissions.sh
  12. if [ "${function_selfname}" != "command_install.sh" ] && [ "${function_selfname}" != "command_update_functions.sh" ]; then
  13. check_system_dir.sh
  14. fi
  15. if [ "${function_selfname}" == "command_install.sh" ]; then
  16. check_glibc.sh
  17. fi
  18. 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 )
  19. for allowed_command in "${allowed_commands_array[@]}"
  20. do
  21. if [ "${allowed_command}" == "${function_selfname}" ]; then
  22. check_logs.sh
  23. fi
  24. done
  25. local allowed_commands_array=( command_debug.sh command_start.sh command_stop.sh )
  26. for allowed_command in "${allowed_commands_array[@]}"
  27. do
  28. if [ "${allowed_command}" == "${function_selfname}" ]; then
  29. check_deps.sh
  30. fi
  31. done
  32. local allowed_commands_array=( command_debug.sh command_details.sh command_monitor.sh command_start.sh command_stop.sh )
  33. for allowed_command in "${allowed_commands_array[@]}"
  34. do
  35. if [ "${allowed_command}" == "${function_selfname}" ]; then
  36. check_ip.sh
  37. fi
  38. done
  39. local allowed_commands_array=( update_check.sh command_debug.sh command_start.sh command_validate.sh )
  40. for allowed_command in "${allowed_commands_array[@]}"
  41. do
  42. if [ "${allowed_command}" == "${function_selfname}" ]; then
  43. if [ -n "${appid}" ]; then
  44. check_steamcmd.sh
  45. fi
  46. fi
  47. done
  48. local allowed_commands_array=( command_console.sh command_start.sh )
  49. for allowed_command in "${allowed_commands_array[@]}"
  50. do
  51. if [ "${allowed_command}" == "${function_selfname}" ]; then
  52. check_tmux.sh
  53. fi
  54. done
  55. local allowed_commands_array=( command_console.sh command_debug.sh command_details.sh command_monitor.sh command_start.sh command_stop.sh )
  56. for allowed_command in "${allowed_commands_array[@]}"
  57. do
  58. if [ "${allowed_command}" == "${function_selfname}" ]; then
  59. check_config.sh
  60. fi
  61. done
  62. local allowed_commands_array=( command_details.sh command_monitor.sh command_start.sh command_stop.sh command_ts3_server_pass.sh update_check.sh command_details.sh command_validate.sh )
  63. for allowed_command in "${allowed_commands_array[@]}"
  64. do
  65. if [ "${allowed_command}" == "${function_selfname}" ]; then
  66. check_status.sh
  67. fi
  68. done