From 5def1d7cdb25d9351b539b55aadf2caa4d6a7623 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 10 Oct 2019 10:01:58 +0200 Subject: sendmailadvanced.hook neu --- Makefile | 1 + sendmailadvanced.hook | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 sendmailadvanced.hook diff --git a/Makefile b/Makefile index 73e62fc..9625478 100644 --- a/Makefile +++ b/Makefile @@ -57,6 +57,7 @@ install: all install -D -m0644 -t $(DESTDIR)$(LIBDIR)/systemd/system backup@.service backup@.timer install -D -m0644 -t $(DESTDIR)$(MANDIR)/man1 backup.1 backup-statistics.1 last-backups.1 remove-old-backups.1 install -D -m0644 -t $(DESTDIR)$(ETCDIR) backup.conf + install -D -m0755 -T sendmailadvanced.hook $(DESTDIR)$(ETCDIR)/sendmailadvanced.hooks/last-backups clean: git clean -x -d -f diff --git a/sendmailadvanced.hook b/sendmailadvanced.hook new file mode 100755 index 0000000..3492399 --- /dev/null +++ b/sendmailadvanced.hook @@ -0,0 +1,18 @@ +#!/bin/sh + +case "$1" in + 'head') + : + ;; + 'foot') + echo '----------------------- Last Backups Begin -------------------------' + echo + last-backups + echo + echo '------------------------ Last Backups End --------------------------' + ;; + *) + >&2 printf 'usage: %s head|foot\n' "${0##*/}" + exit 1 + ;; +esac -- cgit v1.2.3