Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I use Upstart and have the same we use to have by using "# Should-Start:" at the BEGIN INIT INFO of the init script?

Is it there any way I can tailor the "start on started" based on a variable?

share|improve this question

There is no direct equivalent in Upstart terms. If you want to do something similar, you can put your optional deps into pre-start section in your job.

Example (add to your conf file):

pre-start script
  set +e
  start <dep1>
  start <dep2>
  start <dep3>
  start <dep4>
end script

That makes Upstart try starting said optional services and if they are missing, the error is ignored.

share|improve this answer
Thanks for your response Tuminoid. It is “funny” how Ubuntu adopts new technology approaches without caring about Linux, that is its own root. Upstart, as it is, does not address several Unix/Linux issues we may have. Being your response “right”, the best solution in my case is to switch to some other distro that honors the Unix/Linux principles. I believe this does not bring any value added to Ubuntu. Now, for the Ubuntu community, just think that I may not be the only one willing to switch to another distro. Anyway, thanks for the help and cheers! Moacir – Moacir Dec 11 '12 at 22:16
This is incredibly confusing Moacir. The technique described works fine. What exactly is the problem that causes this to "not honor the Unix/Linux principles"? – SpamapS May 30 '13 at 19:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.