check_executable.sh 552 B

123456789101112131415161718
  1. #!/bin/bash
  2. # LGSM check_system_dir.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://gameservermanagers.com
  5. # Description: Checks if systemdir is accessible.
  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 "Expected executable not found: ${executabledir}/${execname}"
  11. if [ -d "${scriptlogdir}" ]; then
  12. fn_print_fail_nl "Executable ${execname} was not found"
  13. fi
  14. exitcode="1"
  15. core_exit.sh
  16. fi