check_tmux.sh 730 B

123456789101112131415161718192021
  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 commandname="CHECK"
  7. local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
  8. if [ "$(command -v tmux)" ]||[ "$(which tmux >/dev/null 2>&1)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
  9. :
  10. else
  11. fn_print_fail_nl "Tmux not installed"
  12. sleep 1
  13. fn_script_log_fatal "Tmux is not installed"
  14. echo " * Tmux is required to run this server."
  15. # Suitable passive agressive message
  16. echo " * Please see the the following link."
  17. echo " * https://gameservermanagers.com/tmux-not-found"
  18. core_exit.sh
  19. fi