You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

report 991B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/bin/sh
  2. # export EMAIL_RECIPIENT=you@example.com
  3. # export EMAIL_SENDER=system@example.com
  4. # export EMAIL_SUBJECT="[$(hostname)] Rapport journalier"
  5. # export HTML_OUTPUT=/tmp/report.html
  6. # export MUNIN_DIRECTORY=/var/cache/munin/www/localhost/localhost
  7. # export SMART_DEVICES="/dev/sda /dev/sdb /dev/sdc"
  8. # export LOGO_URL=
  9. # -> default is: https://upload.deblan.org/u/2019-05/5cefbc0a.png
  10. export PATH=/usr/sbin:/usr/bin:/sbin:/bin
  11. export SCRIPT_NAME="$(realpath "$0")"
  12. export SCRIPT_PATH="$(dirname "$SCRIPT_NAME")"
  13. if [ -z "$TEMPLATE" ]; then
  14. export TEMPLATE="$SCRIPT_PATH/templates/deblan"
  15. fi
  16. cd "$SCRIPT_PATH"
  17. export ULIMIT=$(ulimit -s)
  18. ./hooks/on-start
  19. REPORT="$(
  20. ./scripts/header
  21. ./scripts/system
  22. ./scripts/mount
  23. ./scripts/df
  24. if [ -n "$SMART_DEVICES" ]; then
  25. ./scripts/smart
  26. fi
  27. ./scripts/footer
  28. )"
  29. if [ -n "$HTML_OUTPUT" ]; then
  30. export REPORT
  31. ./generators/html
  32. fi
  33. if [ -n "$EMAIL_RECIPIENT" ]; then
  34. export REPORT
  35. ./generators/email
  36. fi
  37. ./hooks/on-finish