From 4836f4adbedb8b4a62ad9ff6b021bba7c6bab578 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 10 Oct 2019 10:44:23 +0200 Subject: sendmailadvanced.in: fix hook paths --- sendmailadvanced.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sendmailadvanced.in b/sendmailadvanced.in index cbf90e2..cc26e0d 100755 --- a/sendmailadvanced.in +++ b/sendmailadvanced.in @@ -110,12 +110,12 @@ while true; do shift if printf '%s\n' "$1" | grep -qixF 'ALL'; then for hook in $(find '#ETCDIR#/sendmailadvanced.hooks' -type f); do - if [ -x "${hook}" ]; then - hooks[${#hooks[@]}]="${hook}" + if [ -x "${hook}" ] && [ -z "${hook%%#ETCDIR#/sendmailadvanced.hooks/*}" ]; then + hooks[${#hooks[@]}]="${hook##ETCDIR#/sendmailadvanced.hooks/}" fi done else - hooks[${#hooks[@]}]="#ETCDIR#/sendmailadvanced.hooks/$1" + hooks[${#hooks[@]}]="$1" fi ;; --help) -- cgit v1.2.3-70-g09d2