2

i have two upstart scripts, and i want the second one to start after the first

this is what i have in the second one (dir/second):

start on (started runlevel [345] and dir/first)
stop on (stopped dir/first or runlevel [0126])

fyi both scripts are in /etc/init/dir/ directory. i used these two links as references: http://jurjenbokma.com/ApprenticesNotes/ubuntu_upstart.html and http://upstart.ubuntu.com/cookbook/

-- issue 1

and when i start the first one with

initctl start dir/first

the second one does not start!

-- issue 2

also, i am able to start the second one with

 initctl start dir/second

even if the first one is stopped!

so why doesn't this work?

1 Answer 1

1

I think your conditions are incorrect. runlevel [] is an event, and started <job name> is an event, so your conditions should be:

start on runlevel [345] and started dir/first
stop on stopped dir/first or runlevel [0126]
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .