Your script should be in /etc/init.d/ directory.
Then you have to make a symlink from your run-level directory.
I.e you're in run-level 5 (multiuser with X)
Code:
cp /etc/init.d
ln -s /etc/init.d/ /etc/rc.d/rc5.d/S50scriptname
ln -s /etc/init.d/ /etc/rc.d/rc5.d/K50scriptname the K50 is to tell the system to shut down cleanly when you do a shut down.
The number representates in which order the script should start/shut down in. This way you have the possibility to explicity start your server after like when you started networking and other servers that is required by your server.
Change my example obove
Ah, and remember to do "chmod +x
Inga kommentarer:
Skicka en kommentar