summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-10-10 10:44:23 +0200
committerErich Eckner <git@eckner.net>2019-10-10 10:44:23 +0200
commit4836f4adbedb8b4a62ad9ff6b021bba7c6bab578 (patch)
treee041d2f02fc4605df8386cb03804fd702c121c97
parent17b9ee9166c886c762ec2d7d3780aa2627644a7f (diff)
downloadsendmailadvanced-4836f4adbedb8b4a62ad9ff6b021bba7c6bab578.tar.xz
sendmailadvanced.in: fix hook paths
-rwxr-xr-xsendmailadvanced.in6
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)