core_trap.sh 323 B

123456789101112131415
  1. #!/bin/bash
  2. # LinuxGSM core_trap.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://linuxgsm.com
  5. # Description: Handles CTRL-C trap to give an exit code.
  6. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  7. fn_exit_trap(){
  8. echo -e ""
  9. core_exit.sh
  10. }
  11. # trap to give an exit code.
  12. trap fn_exit_trap INT