summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rwxr-xr-xsendmailadvanced.hook18
2 files changed, 19 insertions, 0 deletions
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