Skip to content

Commit

Permalink
Merge pull request #135 from vrtdev/feature/dont-fail-on-empty-dir
Browse files Browse the repository at this point in the history
Ensure the entrypoint script does not fail.
  • Loading branch information
rwaffen authored Oct 23, 2024
2 parents aa8c1ac + 857982e commit e068fce
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions puppetserver/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ pre_execution_handler() {
-exec chmod +x {} \;
sync
for f in /docker-custom-entrypoint.d/*.sh; do
echo "Running $f"
"$f"
if [[ -f "$f" && -x $(realpath "$f") ]]; then
echo "Running $f"
"$f"
fi
done
fi
}
Expand All @@ -42,8 +44,10 @@ post_startup_handler() {
-exec chmod +x {} \;
sync
for f in /docker-custom-entrypoint.d/post-startup/*.sh; do
echo "Running $f"
"$f"
if [[ -f "$f" && -x $(realpath "$f") ]]; then
echo "Running $f"
"$f"
fi
done
fi
fi
Expand All @@ -57,8 +61,10 @@ post_execution_handler() {
-exec chmod +x {} \;
sync
for f in /docker-custom-entrypoint.d/post-execution/*.sh; do
echo "Running $f"
"$f"
if [[ -f "$f" && -x $(realpath "$f") ]]; then
echo "Running $f"
"$f"
fi
done
fi
fi
Expand All @@ -79,8 +85,10 @@ sigterm_handler() {
-exec chmod +x {} \;
sync
for f in /docker-custom-entrypoint.d/sigterm-handler/*.sh; do
echo "Running $f"
"$f"
if [[ -f "$f" && -x $(realpath "$f") ]]; then
echo "Running $f"
"$f"
fi
done
fi
fi
Expand Down

0 comments on commit e068fce

Please sign in to comment.