diff --git a/python/entrypoint.sh b/python/entrypoint.sh index aab4aea..975cf28 100644 --- a/python/entrypoint.sh +++ b/python/entrypoint.sh @@ -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"