dehydrated/dehydrated_hooks

17 lines
338 B
Plaintext
Raw Normal View History

2018-02-01 11:20:37 +01:00
#!/bin/sh
ACTION=${1}
if [ -d "/etc/dehydrated/hooks_"$ACTION".d" ]; then
2022-07-01 16:15:28 +02:00
echo Executing hooks for $ACTION event
2018-02-01 11:20:37 +01:00
shift
for H in $(find /etc/dehydrated/hooks_"$ACTION".d/ -type f -o -type l | sort); do
2022-07-01 16:15:28 +02:00
if [ -x $H ]; then
echo Running $H hook
$H $@
else
echo $H is not executable, skiping
fi
2018-02-01 11:20:37 +01:00
done
fi