check_tmux.sh 752 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. # LGSM check_tmux.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://gameservermanagers.com
  5. # Description: Checks if tmux is installed as too many users do not RTFM or know how to use Google.
  6. local commandnane="CHECK"
  7. local commandaction="Checking"
  8. local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
  9. if [ "$(command -v tmux)" ]||[ "$(which tmux >/dev/null 2>&1)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
  10. :
  11. else
  12. fn_print_fail_nl "Tmux not installed"
  13. sleep 1
  14. fn_script_log_fatal "Tmux is not installed"
  15. echo " * Tmux is required to run this server."
  16. # Suitable passive agressive message
  17. echo " * Please see the the following link."
  18. echo " * https://gameservermanagers.com/tmux-not-found"
  19. core_exit.sh
  20. fi