From 4ce9c573c8533d3b2f1ec6063342fadd06356540 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Fri, 6 Oct 2006 18:42:32 +0000 Subject: Added disk space report option (adam kosmin suggestion) removed sys vserver not running noise report (anarcat suggestion) --- src/backupninja.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/backupninja.in b/src/backupninja.in index 114d66c..3bf0ad1 100755 --- a/src/backupninja.in +++ b/src/backupninja.in @@ -426,6 +426,7 @@ setfile $conffile getconf configdirectory @CFGDIR@/backup.d getconf scriptdirectory @datadir@ getconf reportemail +getconf reportspace getconf reportsuccess yes getconf reportwarning yes getconf loglevel 3 @@ -526,6 +527,17 @@ if [ $doit == 1 ]; then echo ${messages[$i]} done echo -e "$errormsg" + if [ "$reportspace" == "yes" ]; then + previous="" + for i in $(ls "$configdirectory"); do + backuploc=$(grep ^directory "$configdirectory"/"$i" | awk '{print $3}') + if [ "$backuploc" != "$previous" ]; then + mountdev=$(mount | grep "$backuploc" | awk '{print $1}') + df -h "$mountdev" + previous="$backuploc" + fi + done + fi } | mail -s "backupninja: $hostname $subject" $reportemail fi -- cgit v1.2.3