[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Suspending services



Hi,

I have a Potato workstation with several services installed on it.
Thanks to links in /etc/rc?.d they start and stop automatically at
system startup/shutdown :-)

The problem is that I do not need all of them all the time - when I work
on certain subject I would like to switch other services off (e.g.
working on PostgreSQL I do not need MySQL).

1. I can do this manually running '/etc/init.d/<service> stop' but I do
not want to do this every time I reboot the machine.

2. I can run 'update-rc.d -f <service> remove'  but then I have to
remember all the run levels where the service was linked (with order
numbers) and additionally it removes also 'K*' links so the service
(e.g. started by hand) will not have a chance to shutdown correctly.

3. Finally I made my own script which renames all
/etc/rc?.d/S##<service> into skip-S##<service> what works fine
(/etc/init.d/rc does not start such a service on system startup but
stops it during shutdown). The problem is that this is not standard
solution (e.g. not supported by dpkg and update-rc.d).

Is there a better way for suspending services?
What I did looks very tricky - I would prefer something similar to
putting '#' in front of line in /etc/inittab.

Regards,
Piotr Tarnowski



Reply to: