core_trap.sh 250 B

12345678910111213
  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. fn_exit_trap(){
  7. echo ""
  8. core_exit.sh
  9. }
  10. # trap to give an exit code.
  11. trap fn_exit_trap INT