Re: avoid starting a program during reboot
On 9/9/13 1:51 PM, lina wrote:
> I notice apach2 still in /etc/init.d/, it is good, so I can restart it
> when I need it (only occasionally).
Yes. You can use that script to start (and then stop) the service on
demand.
/etc/init.d/apache2 start
That directory is where the template script resides. You can restore
the defaults later if you need to.
update-rc.d apache2 defaults
Or use some custom selection of sequence and runlevels. The defaults
are fished out of the template script and you can view them there in the
script.
> BTW, how do I know, my runlevel is 2?
> $ nice
> 0
runlevel is kind of an anachronism. You can find it by running
'runlevel' and you can change it by running 'telinit' It is/was used to
have different constellations of services running, effectively putting
the machine into different modes of operation.
> and what does 17 stand for?
17 is the sequence in which the script is executed. It can be anything
00 - 99. Look at the numbers of the other scripts in /etc/rc2.d/
The manual pages for update-rc.d, runlevel, and telinit cover a lot of
details and some background. The whole mess is referred to as SystemV
init scripts.
Regards,
/Lars
Reply to: