måndag, februari 04, 2008

script@boot

http://www.linuxforums.org/forum/redhat-fedora-linux-help/24951-start-script-boot.html

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 S50 is to tell the system to start the script when it boots up,
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 with your scriptfile name.
Ah, and remember to do "chmod +x "

Inga kommentarer: