projects
/
matthijs
/
upstream
/
backupninja-vserver.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rdiff works with sshd banner... rdiff local dest works... create logfile... when...
[matthijs/upstream/backupninja-vserver.git]
/
backupninja
diff --git
a/backupninja
b/backupninja
index fb625245b293cd0ab606237c2608ab2d01ac4184..3943724d3449c0ef12b02eaaf9fd7553c2522ac1 100755
(executable)
--- a/
backupninja
+++ b/
backupninja
@@
-143,7
+143,6
@@
function getconf() {
# replace * with %, so that it is not globbed.
ret="${ret//\\*/__star__}"
# replace * with %, so that it is not globbed.
ret="${ret//\\*/__star__}"
- ret="${ret//\*/__star__}"
# this is weird, but single quotes are needed to
# allow for returned values with spaces. $ret is still expanded
# this is weird, but single quotes are needed to
# allow for returned values with spaces. $ret is still expanded
@@
-268,6
+267,8
@@
function process_action() {
getconf when "$defaultwhen"
if [ "$processnow" == 1 ]; then
info "running $file because of --now"
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
else
IFS=$'\t\n'
for w in $when; do
@@
-308,7
+309,7
@@
function process_action() {
_fatals=`cat $bufferfile | grep "^Fatal: " | wc -l`
ret=`grep "\(^Warning: \|^Error: \|^Fatal: \)" $bufferfile`
_fatals=`cat $bufferfile | grep "^Fatal: " | wc -l`
ret=`grep "\(^Warning: \|^Error: \|^Fatal: \)" $bufferfile`
-
#
rm $bufferfile
+ rm $bufferfile
if [ $_fatals != 0 ]; then
msg "*failed* -- $file"
errormsg="$errormsg\n== failures from $file ==\n\n$ret\n"
if [ $_fatals != 0 ]; then
msg "*failed* -- $file"
errormsg="$errormsg\n== failures from $file ==\n\n$ret\n"
@@
-318,10
+319,12
@@
function process_action() {
elif [ $_warnings != 0 ]; then
msg "*warning* -- $file"
errormsg="$errormsg\n== warnings from $file ==\n\n$ret\n"
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
else
- msg "unknown -- $file"
+ msg "success -- $file"
+# elif [ $retcode == 0 ]; then
+# msg "success -- $file"
+# else
+# msg "unknown -- $file"
fi
let "fatals += _fatals"
fi
let "fatals += _fatals"
@@
-407,6
+410,7
@@
getconf GZIP /bin/gzip
getconf RSYNC /usr/bin/rsync
[ -d "$configdirectory" ] || fatal "Configuration directory '$configdirectory' not found."
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"
if [ "$UID" != "0" ]; then
echo "$0 can only be run as root"
@@
-428,7
+432,7
@@
errormsg=""
if [ "$singlerun" ]; then
files=$singlerun
else
if [ "$singlerun" ]; then
files=$singlerun
else
- files=`find $configdirectory -mindepth 1 `
+ files=`find $configdirectory -mindepth 1
| sort -n
`
fi
for file in $files; do
fi
for file in $files; do