while [ $# -ge 1 ]; do
case $1 in
-h|--help) usage;;
- -d|--debug) debug=1;;
+ -d|--debug) debug=1; export BACKUPNINJA_DEBUG=yes;;
-t|--test) test=1;debug=1;;
-n|--now) processnow=1;;
-f|--conffile)
if [ "$reportspace" == "yes" ]; then
previous=""
for i in $(ls "$configdirectory"); do
- backuploc=$(grep ^directory "$configdirectory"/"$i" | @AWK@ '{print $3}')
- if [ "$backuploc" != "$previous" -a -n "$backuploc" ]; then
- df -h "$backuploc"
- previous="$backuploc"
- fi
+ backuploc=$(grep ^directory "$configdirectory"/"$i" | @AWK@ '{print $3}')
+ if [ "$backuploc" != "$previous" -a -n "$backuploc" -a -d "$backuploc" ]; then
+ df -h "$backuploc"
+ previous="$backuploc"
+ fi
done
fi
} | mail -s "backupninja: $hostname $subject" $reportemail