From b8522b35f9205690821dc8fd1278a513b7b68705 Mon Sep 17 00:00:00 2001 From: Christoph Date: Sun, 11 Mar 2018 23:11:14 +0100 Subject: [PATCH] Add 'extra_admin_email'. If set a summary e-mail will also be sent ti this address. --- conf/logrotate.conf.sample | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conf/logrotate.conf.sample b/conf/logrotate.conf.sample index ca90e74..afb08bb 100644 --- a/conf/logrotate.conf.sample +++ b/conf/logrotate.conf.sample @@ -16,6 +16,7 @@ content_type='Content-Type: text/plain;\n charset="utf-8"' + extra_admin_email="" extra_error_email="" ## - These variables will be exportet from backup script (rcopy.sh) @@ -34,6 +35,9 @@ datum=`date +"%d.%m.%Y"` echo -e "To:${admin_email}\n${content_type}\nSubject:Backup $company -- $datum\n$filesystem\n\ndisk label: $label\n$durations\n\n$send\n" | /usr/sbin/sendmail -F "BACKUP $company" -f $from_address $admin_email + if [[ -n "$extra_admin_email" ]]; then + echo -e "To:${extra_admin_email}\n${content_type}\nSubject:Backup $company -- $datum\n$filesystem\n\ndisk label: $label\n$durations\n\n$send\n" | /usr/sbin/sendmail -F "BACKUP $company" -f $from_address $extra_admin_email + fi declare -i error=`grep -e"\[ERROR" $logFile | wc -l` declare -i warning=`grep -e"\[WARN" $logFile | wc -l`