Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 08d1d6e

Browse filesBrowse files
committed
Improved entrypoint execution. Fixes #410. Co-authored by @WoLfulus
1 parent b015837 commit 08d1d6e
Copy full SHA for 08d1d6e

File tree

Expand file treeCollapse file tree

2 files changed

+12
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+12
-6
lines changed

‎src/common/etc/entrypoint.d/0-container-info.sh

Copy file name to clipboardExpand all lines: src/common/etc/entrypoint.d/0-container-info.sh
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ if [ "$SHOW_WELCOME_MESSAGE" = "false" ] || [ "$LOG_OUTPUT_LEVEL" = "off" ] || [
44
echo "👉 $0: Container info was display was skipped."
55
fi
66
# Skip the rest of the script
7-
exit 0
7+
return 0
88
fi
99

1010
echo '

‎src/common/usr/local/bin/docker-php-serversideup-entrypoint

Copy file name to clipboardExpand all lines: src/common/usr/local/bin/docker-php-serversideup-entrypoint
+11-5Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,17 @@ export S6_INITIALIZED
4040

4141
# Execute scripts from /etc/entrypoint.d/ in numeric order
4242
find /etc/entrypoint.d/ -type f -name '*.sh' | sort -n -t- -k1 | while IFS= read -r f; do
43-
[ -e "$f" ] || continue # skip if not exists
44-
case "$f" in
45-
*.sh) . "$f" ;;
46-
*) echo "$0: Invalid extension. Ignoring $f" ;;
47-
esac
43+
if [ -e "$f" ]; then
44+
if [ "$LOG_OUTPUT_LEVEL" = "debug" ]; then
45+
echo "Executing $f"
46+
fi
47+
if ! . "$f"; then
48+
echo "Error executing $f" >&2
49+
exit 1
50+
fi
51+
else
52+
echo "Warning: $f not found" >&2
53+
fi
4854
done
4955

5056
# first arg is `-f` or `--some-option`

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.