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 went througn some manuals and I didn't understand yet. How do I disable autostart nginx service?

share|improve this question
add comment

1 Answer

up vote 18 down vote accepted

Try this command:

sudo update-rc.d -f nginx disable
share|improve this answer
    
I tried sudo update-rc.d -f nginx disable. What is the difference between them? –  Alex Malex Aug 17 '12 at 14:15
    
The difference is that disable is better! :) You got me. It effectively 'makes dpkg aware of your preference to prevent the startup scripts from being executed (because dpkg runs update-rc.d too)'. Credit to @Lekensteyn for the explanation. –  SirCharlo Aug 17 '12 at 14:19
    
I already run disable and then remove. How can I undo it? –  Alex Malex Aug 17 '12 at 14:32
    
Umm.. You want to enable autostart now? –  SirCharlo Aug 17 '12 at 14:34
1  
sudo update-rc.d nginx defaults; sudo update-rc.d -f nginx disable –  SirCharlo Aug 17 '12 at 15:26
show 1 more comment

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.