Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question

3 Answers 3

up vote 9 down vote accepted

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

share|improve this answer

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.

share|improve this answer
    
@Gilles: Oops. thanks! :-) –  htorque Nov 11 '10 at 21:44
    
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 '10 at 5:02

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
share|improve this answer

Your Answer

 
discard

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.