Last active
October 31, 2017 18:08
-
-
Save danclegg/2985b682244652c0a8889089c202a793 to your computer and use it in GitHub Desktop.
Start flask app if not running
This file contains 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
#!/usr/bin/env bash | |
export match=$(netstat -tlapn | grep 8011 | wc -l) | |
if [ $match -lt 1 ] | |
then | |
export FLASK_APP=proxy.py | |
cd $FLASK_APP_DIR | |
flask run --host=0.0.0.0 & | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The actual flask execution doesn't seem to work quite yet.