Linux Know-How provides a collection of introductory texts on often needed Linux skills. |
Home Bash Guide for Beginners Bash and Bash scripts Developing good scripts Example init script | |||
See also: Example Bash script | |||
Search the VIAS Library | Index | |||
Example Init Script
The tasks to be executed upon starting a service or stopping it are listed in the startup scripts. It is one of the system administrator's tasks to configure init, so that services are started and stopped at the correct moment. When confronted with this task, you need a good understanding of the startup and shutdown procedures on your system. We therefore advise that you read the man pages for init and inittab before starting on your own initialization scripts. Here is a very simple example, that will play a sound upon starting and stopping your machine:
The case statement often used in this kind of script is described in here.
|
|||
Home Bash Guide for Beginners Bash and Bash scripts Developing good scripts Example init script |