check_executable.sh 575 B

12345678910111213141516171819
  1. #!/bin/bash
  2. # LinuxGSM check_executable.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://gameservermanagers.com
  5. # Description: Checks if executable exists.
  6. local commandname="CHECK"
  7. local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
  8. # Check if executable exists
  9. if [ ! -f "${executabledir}/${execname}" ]; then
  10. fn_script_log_warn "Executable was not found: ${executabledir}/${execname}"
  11. if [ -d "${scriptlogdir}" ]; then
  12. fn_print_fail_nl "Executable was not found:"
  13. echo " * ${executabledir}/${execname}"
  14. fi
  15. exitcode="1"
  16. core_exit.sh
  17. fi