Open one xterm or console.
Use command cd /etc/init.d/
.
You are now on /etc/init.d/ directory.
Create a file named my_filename.
Add your script to this file with the following lines at the top:
1 2 3 | #!/bin/bash # chkconfig: 345 85 15 # some description for your file |
Enter this in the shell:
chkconfig --add my_filename
Use command chmod u+x my_filename
to make this script executable.
Type command:ntsysv
You will see a GUI.
Your startup script should now be in the list.
Use the space key to set your script.