You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
506 B
Bash
29 lines
506 B
Bash
8 years ago
|
#!/bin/bash
|
||
|
export PYTHONPATH=$PWD/src
|
||
|
|
||
|
install(){
|
||
|
virtualenv sandbox
|
||
|
sandbox/bin/pip install -r requirements.txt
|
||
|
}
|
||
|
|
||
|
start(){
|
||
|
source sandbox/bin/activate
|
||
|
python src/api/index.py --path $PWD/config.json --port 8080 &
|
||
|
}
|
||
|
|
||
|
stop(){
|
||
|
ps -eo pid,command |grep python |grep $PWD |grep -E "^ {0,}[0-9]+" -o |xargs kill -9
|
||
|
}
|