2020-04-05 04:30:53 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-04-11 23:37:15 +03:00
|
|
|
SCRIPT=`realpath $0`
|
|
|
|
SCRIPT_DIR=`dirname $SCRIPT`
|
|
|
|
|
|
|
|
if [[ -z "${PORT}" ]]; then
|
|
|
|
PORT=5000
|
|
|
|
fi
|
2020-04-05 04:30:53 +03:00
|
|
|
|
|
|
|
# Create config json if it doesn't exist
|
2020-04-06 03:09:23 +03:00
|
|
|
if [[ ! -f $SCRIPT_DIR/app/static/config.json ]]; then
|
|
|
|
echo "{}" > $SCRIPT_DIR/app/static/config.json
|
2020-04-05 04:30:53 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
pkill flask
|
|
|
|
|
2020-04-11 23:37:15 +03:00
|
|
|
flask run --host="0.0.0.0" --port=$PORT
|