check_executable.sh 586 B

12345678910111213141516171819
  1. #!/bin/bash
  2. # LinuxGSM check_executable.sh module
  3. # Author: Daniel Gibbs
  4. # Contributors: http://linuxgsm.com/contrib
  5. # Website: https://linuxgsm.com
  6. # Description: Checks if server executable exists.
  7. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  8. # Check if executable exists
  9. if [ ! -f "${executabledir}/${execname}" ]; then
  10. fn_print_fail_nl "executable was not found"
  11. echo -e "* ${executabledir}/${execname}"
  12. if [ -d "${lgsmlogdir}" ]; then
  13. fn_script_log_fatal "Executable was not found: ${executabledir}/${execname}"
  14. fi
  15. unset exitbypass
  16. core_exit.sh
  17. fi