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
remove test
[matthijs/upstream/backupninja-vserver.git]
/
src
/
backupninja.in
diff --git
a/src/backupninja.in
b/src/backupninja.in
index 57936da1d4b2ce5a521dcbdae05c3ee7ed218aa7..114d66c2faef86fb13967ecaf9ea97c259cc80fe 100755
(executable)
--- a/
src/backupninja.in
+++ b/
src/backupninja.in
@@
-132,7
+132,7
@@
function msg {
function check_perms() {
local file=$1
local perms
function check_perms() {
local file=$1
local perms
- perms=($(stat -L --
printf
='%a %g %G %u %U' $file))
+ perms=($(stat -L --
format
='%a %g %G %u %U' $file))
local gperm=${perms[0]:1:1}
local wperm=${perms[0]:2:1}
local gid=${perms[1]}
local gperm=${perms[0]:1:1}
local wperm=${perms[0]:2:1}
local gid=${perms[1]}
@@
-476,7
+476,11
@@
errormsg=""
if [ "$singlerun" ]; then
files=$singlerun
else
if [ "$singlerun" ]; then
files=$singlerun
else
- files=`find $configdirectory -mindepth 1 -maxdepth 1 -type f ! -name '.*.swp' | sort -n`
+ files=`find $configdirectory -follow -mindepth 1 -maxdepth 1 -type f ! -name '.*.swp' | sort -n`
+
+ if [ -z "$files" ]; then
+ fatal "No backup actions configured in '$configdirectory', run ninjahelper!"
+ fi
fi
for file in $files; do
fi
for file in $files; do
@@
-522,7
+526,7
@@
if [ $doit == 1 ]; then
echo ${messages[$i]}
done
echo -e "$errormsg"
echo ${messages[$i]}
done
echo -e "$errormsg"
- } | mail
$reportemail -s "backupninja: $hostname $subject"
+ } | mail
-s "backupninja: $hostname $subject" $reportemail
fi
if [ $actions_run != 0 ]; then
fi
if [ $actions_run != 0 ]; then