typo in backupninja.1
[matthijs/upstream/backupninja.git] / handlers / maildir
index b7c9b3e1d02b519159048c534dce4b2cc43fa991..4b98debfbef9f26acbe82bd14ad1cd3587356b27 100644 (file)
@@ -78,7 +78,10 @@ function do_user() {
        local letter=${user:0:1}
        local source="$srcdir/$letter/$user/"
        local target="$destdir/$letter/$user/$btype.1"
-       [ -d $source ] || fatal "maildir $source not found".
+       if [ ! -d $source ]; then
+         warning "maildir $source not found"
+         return
+    fi
 
        debug "syncing"
        ret=`$RSYNC -e "ssh -p $destport" -r \
@@ -154,7 +157,7 @@ function do_rotate() {
                fi
                
                # Rotate the current list of backups, if we can.
-               oldest=\`find $backuproot -type d -maxdepth 1 -name \$rottype'.*' | sed 's/^.*\.//' | sort -n | tail -1\`
+               oldest=\`find $backuproot -type d -maxdepth 1 -name \$rottype'.*' | @SED@ 's/^.*\.//' | sort -n | tail -1\`
                #echo "Debug: oldest \$oldest"
                [ "\$oldest" == "" ] && oldest=0
                for (( i=\$oldest; i > 0; i-- )); do
@@ -198,7 +201,7 @@ function do_rotate() {
        for rottype in daily weekly monthly; do
                max=\$((keep\${rottype}+1))
                dir="$backuproot/\$rottype"
-               oldest=\`find $backuproot -type d -maxdepth 1 -name \$rottype'.*' | sed 's/^.*\.//' | sort -n | tail -1\`
+               oldest=\`find $backuproot -type d -maxdepth 1 -name \$rottype'.*' | @SED@ 's/^.*\.//' | sort -n | tail -1\`
                [ "\$oldest" == "" ] && oldest=0 
                # if we've rotated the last backup off the stack, remove it.
                for (( i=\$oldest; i >= \$max; i-- )); do
@@ -332,7 +335,7 @@ if [ "$backup" == "yes" ]; then
                        debug $i
                        for user in `ls -1`; do
                                [ "$user" != "" ] || continue
-                               info $user
+                               debug $user
                                do_rotate $user
                                setup_remote_dirs $user $btype
                                do_user $user $btype