#!/bin/sh PATH=/usr/sbin:/usr/bin:/sbin:/bin export _SCRIPT_NAME="$(realpath "$0")" export _SCRIPT_PATH="$(dirname "$_SCRIPT_NAME")" # export EMAIL_RECIPIENT=you@example.com # export EMAIL_SENDER=system@example.com # export EMAIL_SUBJECT="[$(hostname)] Rapport journalier" # export HTML_OUTPUT=/tmp/report.html # export MUNIN_DIRECTORY=/var/cache/munin/www/localhost/localhost # export SMART_DEVICES="/dev/sda /dev/sdb /dev/sdc" if [ -z "$TEMPLATE" ]; then export TEMPLATE="$_SCRIPT_PATH/templates/deblan" fi cd "$_SCRIPT_PATH" ./hooks/on-start REPORT="$( ./scripts/header ./scripts/system ./scripts/mount ./scripts/df ./scripts/smart ./scripts/footer )" if [ -n "$HTML_OUTPUT" ]; then export REPORT ./scripts/html fi if [ -n "$EMAIL_RECIPIENT" ]; then export REPORT ./scripts/email fi ./hooks/on-finish