check_executable.sh 544 B

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