Created
August 18, 2016 19:54
-
-
Save thegalexc/844dd0eb64a98c508fbf9f046c1460e5 to your computer and use it in GitHub Desktop.
Simple example of an entry point that starts the health_check.py server as a background process
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Set the Python path | |
# | |
READLINK=$(command -v greadlink || command -v readlink || die "...Error: readlink is not in your path! Are you in the right virtualenv?") | |
DIRNAME=$(dirname $0) | |
PYTHONPATH=$($READLINK -f $DIRNAME/..) | |
echo "Starting healthcheck server as background process ..." | |
CONTAINER_IP=$(curl -s http://rancher-metadata/2015-12-19/self/container/primary_ip) | |
CONTAINER_IP=$CONTAINER_IP python bin/health_check.py & | |
python my_awesome_script.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment