How to set a Upstart job to start manually?
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
Solution 1:
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.
Solution 2:
Just for reference: Since upstart 0.6.7 (in Ubuntu since natty), there is a stanza called manual designed for just this purpose.
Solution 3:
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