From 1c6677ebddff17f5efdaddebf19a89ec15d58b3d Mon Sep 17 00:00:00 2001 From: intrigeri Date: Sat, 8 Jun 2013 08:58:49 +0200 Subject: Add option to include rdiff-backup output in reports. Thanks to David Gasaway for the patch. --- handlers/rdiff.in | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'handlers') diff --git a/handlers/rdiff.in b/handlers/rdiff.in index c3c8d1d..471a3d7 100644 --- a/handlers/rdiff.in +++ b/handlers/rdiff.in @@ -85,6 +85,7 @@ getconf testconnect yes getconf nicelevel 0 getconf bwlimit getconf ignore_version no +getconf output_as_info no setsection source getconf type; sourcetype=$type @@ -182,7 +183,11 @@ if [ "$keep" != yes ]; then if [ $test = 0 ]; then output="`su -c "$removestr" 2>&1`" if [ $? = 0 ]; then - debug $output + if [ "$output_as_info" == "yes" ]; then + info $output + else + debug $output + fi info "Removing backups older than $keep days succeeded." else warning $output @@ -268,7 +273,11 @@ debug "$execstr" if [ $test = 0 ]; then output=`nice -n $nicelevel su -c "$execstr" 2>&1` if [ $? = 0 ]; then - debug $output + if [ "$output_as_info" == "yes" ]; then + info $output + else + debug $output + fi info "Successfully finished backing up source $label" else error $output -- cgit v1.2.3