rdiff works with sshd banner... rdiff local dest works... create logfile... when...
[matthijs/upstream/backupninja.git] / backupninja
index 3cd3cae1a1e487d6de202ebd08bc15088c0cb05c..3943724d3449c0ef12b02eaaf9fd7553c2522ac1 100755 (executable)
@@ -267,6 +267,8 @@ function process_action() {
        getconf when "$defaultwhen"
        if [ "$processnow" == 1 ]; then
                info "running $file because of --now"
+       elif [ "$when" == "hourly" ]; then
+               debug "running $file because 'when = hourly'"
        else
                IFS=$'\t\n'
                for w in $when; do
@@ -317,10 +319,12 @@ function process_action() {
        elif [ $_warnings != 0 ]; then
                msg "*warning* -- $file"
                errormsg="$errormsg\n== warnings from $file ==\n\n$ret\n"
-       elif [ $retcode == 0 ]; then
-               msg "success -- $file"
        else
-               msg "unknown -- $file"
+               msg "success -- $file"
+#      elif [ $retcode == 0 ]; then
+#              msg "success -- $file"
+#      else
+#              msg "unknown -- $file"
        fi
 
        let "fatals += _fatals"
@@ -406,6 +410,7 @@ getconf GZIP /bin/gzip
 getconf RSYNC /usr/bin/rsync
 
 [ -d "$configdirectory" ] || fatal "Configuration directory '$configdirectory' not found."
+[ -f "$logfile" ] || touch $logfile
 
 if [ "$UID" != "0" ]; then
        echo "$0 can only be run as root"
@@ -427,7 +432,7 @@ errormsg=""
 if [ "$singlerun" ]; then
        files=$singlerun
 else
-       files=`find $configdirectory -mindepth 1 `
+       files=`find $configdirectory -mindepth 1 | sort -n`
 fi
 
 for file in $files; do