|
@@ -8,12 +8,7 @@ proc = None
|
|
|
|
|
|
def start(args, logfile, errfile):
|
|
def start(args, logfile, errfile):
|
|
global proc
|
|
global proc
|
|
- proc = subprocess.Popen(
|
|
|
|
- [BIN + "/gunicorn",
|
|
|
|
- "-c", "gunicorn_conf.py",
|
|
|
|
- "-e", "DBHOSTNAME=" + args.database_host,
|
|
|
|
- "app:app"],
|
|
|
|
- cwd="bottle", stderr=errfile, stdout=logfile)
|
|
|
|
|
|
+ proc = subprocess.Popen( "$PY3_GUNICORN -c gunicorn_conf.py -e DBHOSTNAME=%s app:app" % args.database_host, cwd="bottle", shell=True, stderr=errfile, stdout=logfile)
|
|
return 0
|
|
return 0
|
|
|
|
|
|
|
|
|
|
@@ -24,4 +19,7 @@ def stop(logfile, errfile):
|
|
proc.terminate()
|
|
proc.terminate()
|
|
proc.wait()
|
|
proc.wait()
|
|
proc = None
|
|
proc = None
|
|
|
|
+
|
|
|
|
+ subprocess.call("sudo pkill gunicorn", shell=True, stderr=errfile, stdout=logfile)
|
|
|
|
+
|
|
return 0
|
|
return 0
|