parent
							
								
									cd14d6a4cf
								
							
						
					
					
						commit
						493da2eb5b
					
				@ -0,0 +1,18 @@
 | 
				
			|||||||
 | 
					#!/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
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$1
 | 
				
			||||||
					Loading…
					
					
				
		Reference in new issue