[pmg-devel] applied: [PATCH pmg-api v2 2/3] backup: fix #3146 add email notifications

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Mar 5 22:43:18 CET 2021


On 01.03.21 15:12, Stoiko Ivanov wrote:
> this patch addresses the missing email notification for scheduled
> backup related tasks, which we have in all our other products, for our
> mail product.
> 
> the parameter names are inspired by PBS' datastore config.
> 
> the default is 'never' in order to stay consistent with the current
> code.
> 
> it uses the templateing system for the notification, because this
> results in less code and a bit of added flexibility for the users.
> 
> the recipient address is currently hardcoded to the admin address in
> pmg.conf as we also send the (admin) pmgreport there, and I did not
> want to overengineer this (even more).
> 
> I shortly considered adding a $SIG{'__DIE__'} handler to the
> run_backup API call but dropped the idea due to the warning in
> perlvar(1).
> 
> Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
> ---
>  src/Makefile                         |  1 +
>  src/PMG/API2/PBS/Job.pm              | 34 ++++++++++++++++++++-------
>  src/PMG/Backup.pm                    | 35 ++++++++++++++++++++++++++++
>  src/PMG/PBSConfig.pm                 |  7 ++++++
>  src/templates/backup-notification.tt | 19 +++++++++++++++
>  5 files changed, 88 insertions(+), 8 deletions(-)
>  create mode 100644 src/templates/backup-notification.tt
> 
>

applied, squashed in a fixup dropping the extra \n in $log->() calls we talked about off-list.
thanks!




More information about the pmg-devel mailing list