All you need to do is:
- Log in as the super user.
- Write your shell script.
- Copy the file to
- Make the script executable.
- Link the file to the run level directory, either
//etc//rc3.dor both. Note that the default run level is '3' so use rc3.d
su - root
cp fred //etc//init.d
chmod 755 //etc//init.d/fred
ln -s ..//init.d//fred //etc//rc3.d/fred S90fred
All scripts that are prefixed with an 'S' are run with a 'start' parameter, eg:
If the service that you're installing has a close down script, then add another link:
ln -s ..//init.d//fred //etc//rc3.d/fred K90fred
This will close the service down and is equivalent to:
Obviously, the close down script is optional and depends upon the service your script deals with.
For some reason, numbers greater than 100 don't seem to work?!? E.G.
S110fredand I don't know why - I guess that it's a bug...
Remember that scripts are run in numerical order: