16

I want to disable a bunch of upstart jobs here. I know how to make a upstart job. And also I know how to stop manually a job. However, I can't find a sample where I turn a automatically job into a manually job. That is, I want the job to be started only when the user activate, for instance running this command (as root):

service job-name start

4 Answers 4

15

Delete or comment out the start on part (using the number sign '#'). Commenting it out has the advantage of easy recoverability of the original state.

2
  • You can also remove the start on part (or not add one, if you are writing a job yourself), but commenting it out is useful if you want to re-enable it later...
    – JanC
    Nov 12, 2010 at 5:02
  • This one worked well. Autostart was disabled while I can manually start Mongod as a service. Thanks. Jul 25, 2016 at 14:29
9

Just for reference: Since upstart 0.6.7 (in Ubuntu since natty), there is a stanza called manual designed for just this purpose.

5

As mentioned by @MvG, there is the manual stanza which declares an upstart service to be started manually only.

As root, put this into the .override file in /etc/init/ matching your job name:

echo "manual" > /etc/init/${JOB-NAME}.override

or using sudo:

echo "manual" | sudo tee /etc/init/${JOB-NAME}.override
0

Apache for example does not use 'upstart'. Apache is old fashioned Sys V link starting in rc2.d

The clue is when a service is missing such as : '/etc/init/apache2.conf'

In such cases you need good old fashioned SysV techniques.

A starting point is : Look for a README in /etc/init.d

Also GUI Tools exist for tweeking run levels

Nota Bene : upstart is getting depreciated, and eventually the distros are going to migrate to systemd. Oh what fun.

You must log in to answer this question.

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