check_status.sh 390 B

12345678910
  1. #!/bin/bash
  2. # LinuxGSM check_status.sh module
  3. # Author: Daniel Gibbs
  4. # Contributors: http://linuxgsm.com/contrib
  5. # Website: https://linuxgsm.com
  6. # Description: Checks the process status of the server. Either online or offline.
  7. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  8. status=$(tmux list-sessions -F "#{session_name}" 2> /dev/null | grep -Ecx "^${sessionname}")