aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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