diff options
author | Erich Eckner <git@eckner.net> | 2019-10-10 10:44:23 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-10-10 10:44:23 +0200 |
commit | 4836f4adbedb8b4a62ad9ff6b021bba7c6bab578 (patch) | |
tree | e041d2f02fc4605df8386cb03804fd702c121c97 | |
parent | 17b9ee9166c886c762ec2d7d3780aa2627644a7f (diff) | |
download | sendmailadvanced-4836f4adbedb8b4a62ad9ff6b021bba7c6bab578.tar.xz |
sendmailadvanced.in: fix hook paths
-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) |