summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--paccheck.hook18
2 files changed, 19 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 8fd8cc3..23b07e4 100644
--- a/Makefile
+++ b/Makefile
@@ -49,7 +49,7 @@ install: all
install -D -m0755 sendmailadvanced $(DESTDIR)$(BINDIR)/sendmailadvanced
install -D -m0644 sendmailadvanced.1 $(DESTDIR)$(MANDIR)/man1/sendmailadvanced.1
install -D -m0644 sendmailadvanced.conf $(DESTDIR)$(ETCDIR)/sendmailadvanced.conf
- install -d -m0755 $(DESTDIR)$(ETCDIR)/sendmailadvanced.hooks
+ install -D -m0755 paccheck.hook $(DESTDIR)$(ETCDIR)/sendmailadvanced.hooks/paccheck
clean:
ls -A | \
diff --git a/paccheck.hook b/paccheck.hook
new file mode 100644
index 0000000..c5f3668
--- /dev/null
+++ b/paccheck.hook
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+case "$1" in
+ 'head')
+ :
+ ;;
+ 'foot')
+ echo '----------------------- Pacman Check Begin -------------------------'
+ echo
+ paccheck --list-broken --sha256sum
+ echo
+ echo '------------------------ Pacman Check End --------------------------'
+ ;;
+ *)
+ >&2 printf 'usage: %s head|foot\n' "${0##*/}"
+ exit 1
+ ;;
+esac