Files
yolks/python/entrypoint.sh
Softwarenoob 6b1fde7b50 feat: migrate Python images based on eval startup to support Discord egg
Migrates Python images from images fork with eval startup that correctly parses the Discord.py startup parameters
2021-08-06 21:55:29 +03:00

16 lines
405 B
Bash

#!/bin/bash
cd /home/container
# Make internal Docker IP address available to processes.
export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'`
# 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}"
# Run the Server
eval ${MODIFIED_STARTUP}