summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-10-10 08:31:04 +0200
committerErich Eckner <git@eckner.net>2019-10-10 08:31:04 +0200
commit67cafc39ffe037b5886a7322d62df46d44451d1d (patch)
tree26e34efbfc032e4d26ed911e7c85dc7defff72dd
parent3b093702813d2f86267c30ccc94159cd22b1999e (diff)
downloadsendmailadvanced-67cafc39ffe037b5886a7322d62df46d44451d1d.tar.xz
sendmailadvanced.conf: style + add header hook "paccheck"
-rwxr-xr-xsendmailadvanced.conf17
1 files changed, 10 insertions, 7 deletions
diff --git a/sendmailadvanced.conf b/sendmailadvanced.conf
index ae8ad24..831c0e8 100755
--- a/sendmailadvanced.conf
+++ b/sendmailadvanced.conf
@@ -4,7 +4,7 @@
# default recipient to encrypt to
gpg_recipients=(
- "me@example.com"
+ 'me@example.com'
)
# stamp value
@@ -13,31 +13,34 @@ hashcash_bits=22
# things to put into head of (body of) email
body_header_hook()
{
- [ "$(whoami)" == "root" ] && [ "$1" == "last-backups" ] && return 0
+ if [ "$(whoami)" == 'root' ]; then
+ [ "$1" == 'last-backups' ] && return 0
+ [ "$1" == 'paccheck' ] && return 0
+ fi
echo "Unkonwn header-hook: '$1'"
}
# things to put into foot of email
body_footer_hook()
{
- if [ "$(whoami)" == "root" ]; then
+ if [ "$(whoami)" == 'root' ]; then
case "$1" in
'last-backups')
- echo "----------------------- Last Backups Begin -------------------------"
+ echo '----------------------- Last Backups Begin -------------------------'
echo
last-backups
echo
- echo "------------------------ Last Backups End --------------------------"
+ echo '------------------------ Last Backups End --------------------------'
echo
return 0
;;
'paccheck')
if command -v paccheck >/dev/null; then
- echo "----------------------- Pacman Check Begin -------------------------"
+ echo '----------------------- Pacman Check Begin -------------------------'
echo
paccheck --list-broken --sha256sum
echo
- echo "------------------------ Pacman Check End --------------------------"
+ echo '------------------------ Pacman Check End --------------------------'
echo
return 0
fi