【发布时间】:2012-10-29 08:50:54
【问题描述】:
这是我的 shell 脚本的代码:
#!/bin/bash
source /path/to/active
gunicorn_django -c /path/to/conf.py -D
上面的 sh 文件在执行时会启动 gunicorn 进程,但它没有使用配置文件。
但是,如果我直接从命令行执行命令,比如
gunicorn_django -c path/to/conf.py -D
那么它正在使用配置文件。
另外,在 sh 文件中,如果我直接给出选项,如 -w 3 -error-logfile 等。那么它正在接受选项。
【问题讨论】:
-
您需要提供
conf.py文件的完整路径。
标签: python django bash shell gunicorn