diff options
author | Micah Anderson <micah@riseup.net> | 2006-10-06 18:42:32 +0000 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2006-10-06 18:42:32 +0000 |
commit | 4ce9c573c8533d3b2f1ec6063342fadd06356540 (patch) | |
tree | e249d18c5b4f2cc6883539921ab1625d3647c714 /src/backupninja.in | |
parent | 4ceb4f15c23d53cfe3c25c4e96f667970c7552d0 (diff) | |
download | backupninja-4ce9c573c8533d3b2f1ec6063342fadd06356540.tar.gz backupninja-4ce9c573c8533d3b2f1ec6063342fadd06356540.tar.bz2 |
Added disk space report option (adam kosmin suggestion)
removed sys vserver not running noise report (anarcat suggestion)
Diffstat (limited to 'src/backupninja.in')
-rwxr-xr-x | src/backupninja.in | 12 |
1 files changed, 12 insertions, 0 deletions
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 |