Commit cfa2bae819fa8e55e3e6fe3eed5f9f163b30d9b9
1 parent
21724174
Exists in
master
and in
4 other branches
Shell wrapper
Showing
1 changed file
with
21 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,21 @@ | @@ -0,0 +1,21 @@ | ||
1 | +#/bin/env sh | ||
2 | + | ||
3 | +# | ||
4 | +# Shell wrapper to locally run the flask app as any user: | ||
5 | +# | ||
6 | +# sudo -u www-data ./pdc_web.sh | ||
7 | +# | ||
8 | +# Of course, any prerequisites, installation procedure and configuration files may have been fullfilled. | ||
9 | +# See README.md and INSTALL.md for more details | ||
10 | +# | ||
11 | + | ||
12 | +SCRIPT_PATH=$(readlink -f $0) | ||
13 | +SCRIPT_DIR=$(dirname $SCRIPT_PATH) | ||
14 | + | ||
15 | +cd $SCRIPT_DIR | ||
16 | + | ||
17 | +[ ! -f ./venv/bin/activate ] && echo "Create python virtual env ./venv/" && exit | ||
18 | +[ ! -f .flaskenv ] && echo "Create .flaskenv file" && exit | ||
19 | + | ||
20 | +. ./venv/bin/activate | ||
21 | +flask run |