aboutsummaryrefslogtreecommitdiff
path: root/handlers/sys.in
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2008-06-24 19:53:36 +0000
committerMicah Anderson <micah@riseup.net>2008-06-24 19:53:36 +0000
commit4d81bb451c2cc8d5ffac5cf4ad64d524ae55c66f (patch)
tree6dfa52e657a7e303b67ffdd526d4e2adfab6ca85 /handlers/sys.in
parent33ff4f7506fcaab09fd7ad898507f37b7777ba8f (diff)
downloadbackupninja-4d81bb451c2cc8d5ffac5cf4ad64d524ae55c66f.tar.gz
backupninja-4d81bb451c2cc8d5ffac5cf4ad64d524ae55c66f.tar.bz2
fixed catifexec function to actually work, also now takes arguments that are passed, thanks to a report from John Hallam
Diffstat (limited to 'handlers/sys.in')
-rwxr-xr-xhandlers/sys.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/handlers/sys.in b/handlers/sys.in
index 2c48883..9e6343f 100755
--- a/handlers/sys.in
+++ b/handlers/sys.in
@@ -188,10 +188,12 @@ catiffile () {
}
catifexec () {
- echo $HASHES >> $sysreportfile
- echo "# $STATUS" >> $sysreportfile
- echo $HASHES >> $sysreportfile
- $1 >> $sysreportfile 2>&1 || info "executing of $1 failed"
+ if [ -x $1 ]; then
+ echo $HASHES >> $sysreportfile
+ echo "# $STATUS" >> $sysreportfile
+ echo $HASHES >> $sysreportfile
+ $* >> $sysreportfile 2>&1 || info "executing of $1 failed"
+ fi
}