Ubuntu upstart init脚本无法运行

时间:2018-04-12 09:18:31

标签: linux bash nginx terminal

我正在关注here的nginx教程,并按照教程中的说明在myproject.conf中创建了/etc/init/文件。代码如下:

description "uWSGI server instance configured to serve myproject"

start on runlevel [2345]
stop on runlevel [!2345]

setuid ec2-user
setgid www-data


env PATH=/home/ec2-user/login_test/venv/bin
chdir /home/ec2-user/login_test/oauth_login
exec uwsgi --ini wsgi.ini

当我尝试通过提供sudo start myproject来激活它时,它会返回:

start: Unknown job: myproject

我怎样才能让它发挥作用?

0 个答案:

没有答案