check.sh 766 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash
  2. # LGSM fn_check function
  3. # Author: Daniel Gibbs
  4. # Website: http://gameservermanagers.com
  5. lgsm_version="201215"
  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 [ "${module}" != "install" ]; then
  15. check_systemdir.sh
  16. fi
  17. no_check_logs=( details install map-compressor )
  18. fn_module_compare "${cmd}" "${no_check_logs[@]}"
  19. if [ $? != 0 ]; then
  20. fn_check_logs
  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. fn_check_steamcmd
  28. fn_check_steamuser
  29. fn_check_tmux
  30. fn_check_ts3status # may need to move out of checks