28.6. Other methods of starting and shutting down services

If you do not want to mess around with the /etc/inittab file, there is another method open to you. Most systems have an rc.local file, located in or around /etc. This is a script file that kicks off after all the inittab and rc.scripts have been started. You can enter any commands in this file if you wish, or add an entry in to call your favourite start-up script.

Some systems also ship a script file called shutdown in /bin though more generally in /usr/sbin. Use this to shut down your favourite services when the shutdown command is issued.

Get Linux and Unix Shell Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.