Print executed and skiped hooks
This commit is contained in:
parent
13e6ef7e6a
commit
1655297695
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue