still working

This commit is contained in:
notplants
2025-11-02 14:19:06 -05:00
parent 3a33573fba
commit 3e4cf66594
2 changed files with 23 additions and 9 deletions

26
abra-entrypoint.sh Normal file
View File

@ -0,0 +1,26 @@
#!/bin/sh
set -e
echo "++ running new entrypoint"
ORIGINAL_ENTRYPOINT="$1"
shift
echo "++ original entrypoint: ${ORIGINAL_ENTRYPOINT}"
# --- Load secrets into environment variables ---
if [ -d /run/secrets ]; then
for secret_file in /run/secrets/*; do
echo "++ loading secret: ${secret_file}"
var_name=$(basename "$secret_file" | tr '[:lower:]' '[:upper:]')
export "$var_name"="$(cat "$secret_file")"
done
fi
echo "++ command: ${@}"
# --- Execute the original entrypoint and command ---
if [ -n "$ORIGINAL_ENTRYPOINT" ] && [ "$ORIGINAL_ENTRYPOINT" != "null" ]; then
exec "$ORIGINAL_ENTRYPOINT" "$@"
else
exec "$@"
fi