From 2a32458d4c6ebfa63c393ac62a6a63bb01fb57d8 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 9 Oct 2019 10:49:06 +0200 Subject: sendmailadvanced.conf: style --- sendmailadvanced.conf | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sendmailadvanced.conf b/sendmailadvanced.conf index 57e607f..de6deb9 100755 --- a/sendmailadvanced.conf +++ b/sendmailadvanced.conf @@ -20,14 +20,18 @@ body_header_hook() # things to put into foot of email body_footer_hook() { - if [ "$(whoami)" == "root" ] && [ "$1" == "last-backups" ]; then - echo "----------------------- Last Backups Begin -------------------------" - echo - last-backups - echo - echo "------------------------ Last Backups End --------------------------" - echo - return 0 + if [ "$(whoami)" == "root" ]; then + case "$1" in + 'last-backups') + echo "----------------------- Last Backups Begin -------------------------" + echo + last-backups + echo + echo "------------------------ Last Backups End --------------------------" + echo + return 0 + ;; + esac fi echo "Unknown footer-hook: '$1'" } -- cgit v1.2.3-70-g09d2