Apply #262 to Python entrypoint

Works on a local/private docker image
This commit is contained in:
srnyx
2025-03-10 18:45:04 -04:00
committed by GitHub
parent a0c472c743
commit be4d0491d9

View File

@@ -8,9 +8,13 @@ export INTERNAL_IP
# Print current Python version
python --version
# Replace Startup Variables
MODIFIED_STARTUP=$(echo -e $(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g'))
echo -e ":/home/container$ ${MODIFIED_STARTUP}"
# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell
# variable format of "${VARIABLE}" before evaluating the string and automatically
# replacing the values.
PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g')
# Run the Server
eval ${MODIFIED_STARTUP}
# Display the command we're running in the output, and then execute it with eval
printf "\033[1m\033[33mcontainer@pelican~ \033[0m"
echo "$PARSED"
# shellcheck disable=SC2086
eval "$PARSED"