aboutsummaryrefslogtreecommitdiff
path: root/src/backupninja.in
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2006-10-06 18:42:32 +0000
committerMicah Anderson <micah@riseup.net>2006-10-06 18:42:32 +0000
commit4ce9c573c8533d3b2f1ec6063342fadd06356540 (patch)
treee249d18c5b4f2cc6883539921ab1625d3647c714 /src/backupninja.in
parent4ceb4f15c23d53cfe3c25c4e96f667970c7552d0 (diff)
downloadbackupninja-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-xsrc/backupninja.in12
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