Saturday, September 26, 2009

Howto - Create new startup script.

Ok, this is pretty trivial but yet very important.

You're working under run-level 3 and you wish to execute a a super duper startup script - located under:/usr/local/bin/, each time system enters run-level 3.
Let's see how it's done:
1.First of all chmod 700 /usr/local/bin/ (security reasons..).

2.Next, change directory to:
cd /etc/init.d/rc3.d/

3.From here we will create a symbolic link to the real location of the script:
ln -s /usr/local/bin/

The S99 prefix, S=start ,99=startup sequence (last one).
From now every time user enters run-level 3 the script will run.

No comments: