From 165529769542e475de19c8a8ab0ead800fcdd4b5 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 1 Jul 2022 16:15:28 +0200 Subject: [PATCH] Print executed and skiped hooks --- dehydrated_hooks | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dehydrated_hooks b/dehydrated_hooks index a1caf19..67caed5 100644 --- a/dehydrated_hooks +++ b/dehydrated_hooks @@ -3,8 +3,14 @@ ACTION=${1} if [ -d "/etc/dehydrated/hooks_"$ACTION".d" ]; then + echo Executing hooks for $ACTION event shift for H in $(find /etc/dehydrated/hooks_"$ACTION".d/ -type f -o -type l | sort); do - [ -x $H ] && $H $@ + if [ -x $H ]; then + echo Running $H hook + $H $@ + else + echo $H is not executable, skiping + fi done fi