check.sh 958 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/bin/bash
  2. # LGSM fn_check function
  3. # Author: Daniel Gibbs
  4. # Website: http://gameservermanagers.com
  5. lgsm_version="271215"
  6. # Description: Overall function for managing checks.
  7. # Runs checks that will either halt on or fix an issue.
  8. fn_module_compare() {
  9. local e
  10. for e in "${@:2}"; do [[ "$e" == "$1" ]] && return 0; done
  11. return 1
  12. }
  13. check_root.sh
  14. if [ "${cmd}" != "install" ]; then
  15. check_systemdir.sh
  16. fi
  17. no_check_logs=( debug details install map-compressor )
  18. fn_module_compare "${cmd}" "${no_check_logs[@]}"
  19. if [ $? != 0 ]; then
  20. check_logs.sh
  21. fi
  22. check_ip=( debug )
  23. fn_module_compare "${cmd}" "${no_check_logs[@]}"
  24. if [ $? != 0 ]; then
  25. check_ip.sh
  26. fi
  27. check_ip=( debug )
  28. fn_module_compare "${cmd}" "${no_check_logs[@]}"
  29. if [ $? != 0 ]; then
  30. check_steamuser.sh
  31. check_steamcmd.sh
  32. fi
  33. check_ip=( start )
  34. fn_module_compare "${cmd}" "${no_check_logs[@]}"
  35. if [ $? != 0 ]; then
  36. check_tmux.sh
  37. fi
  38. #check_ts3status.sh # may need to move out of checks