diff options
Diffstat (limited to 'sendmailadvanced.in')
-rwxr-xr-x | sendmailadvanced.in | 6 |
1 files 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) |