Friday, June 1, 2007

Startup - Like autoexec.bat :)

This script will run before the graphical interface appears...

1. Make the script with desired commands.
vi file.sh

2. Copy the script to /etc/init.d
cp file.sh /etc/init.d/file.sh

3. Change permission to allow execution
chmod +x /etc/init.d/file.sh

4. At /etc/init.d Link it!
sudo update-rc.d file.sh start 99 2 .
(do not forget the "." at the end of the command)


If you need to disable this script in a near future:
sudo update-rc.d -f file.sh remove