4
0

command_dev_debug.sh 700 B

123456789101112131415161718192021222324252627
  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. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  10. fn_firstcommand_reset
  11. fn_print_dots ""
  12. check.sh
  13. core_logs.sh
  14. if [ -f "${rootdir}/.dev-debug" ]; then
  15. rm -f "${rootdir:?}/.dev-debug"
  16. fn_print_ok_nl "Disabled dev-debug"
  17. fn_script_log_info "Disabled dev-debug"
  18. else
  19. date '+%s' > "${rootdir}/.dev-debug"
  20. fn_print_ok_nl "Enabled dev-debug"
  21. fn_script_log_info "Enabled dev-debug"
  22. fi
  23. core_exit.sh