Skip to content

Instantly share code, notes, and snippets.

@danclegg
Last active October 31, 2017 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danclegg/2985b682244652c0a8889089c202a793 to your computer and use it in GitHub Desktop.
Save danclegg/2985b682244652c0a8889089c202a793 to your computer and use it in GitHub Desktop.
Start flask app if not running
#!/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
@danclegg
Copy link
Author

The actual flask execution doesn't seem to work quite yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment