+ 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