4
0

command_dev_debug.sh 662 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. # LinuxGSM command_dev_debug.sh module
  3. # Author: Daniel Gibbs
  4. # Contributors: http://linuxgsm.com/contrib
  5. # Website: https://linuxgsm.com
  6. # Description: Dev only: Enables debugging log to be saved to dev-debug.log.
  7. commandname="DEV-DEBUG"
  8. commandaction="Developer debug"
  9. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  10. fn_firstcommand_reset
  11. if [ -f "${rootdir}/.dev-debug" ]; then
  12. rm -f "${rootdir:?}/.dev-debug"
  13. fn_print_ok_nl "Disabled dev-debug"
  14. fn_script_log_info "Disabled dev-debug"
  15. else
  16. date '+%s' > "${rootdir}/.dev-debug"
  17. fn_print_ok_nl "Enabled dev-debug"
  18. fn_script_log_info "Enabled dev-debug"
  19. fi
  20. core_exit.sh