How can I start nginx via upstart ?
Posted
by Chiggsy
on Server Fault
See other posts from Server Fault
or by Chiggsy
Published on 2010-05-19T16:56:51Z
Indexed on
2010/05/20
1:20 UTC
Read the original article
Hit count: 330
Background:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04 LTS"
I've built nginx, and I'd like to use upstart to start it:
nginx upstart script from the site:
description "nginx http daemon"
start on runlevel 2
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6
console owner
exec /usr/sbin/nginx -c /etc/nginx/nginx.conf -g "daemon off;"
respawn
I get "unknown job" when i try to use initctl to run it, which I just learned apparently means there is an error, ( what's wrong with "Error" to describe errors?)
Can someone point me in the right direction ? I've read the documentation , as it is, and it seems kind of sparse for a SysV init replacement... but whatever just need to add this job to the list, run it, and get on with what's left of my life... Any tips?
EDIT: initctl version init (upstart 0.6.5)
© Server Fault or respective owner