How to implement program autorun when Linux Boot-up

Sometimes, we need program autorun when the Linux OS  Boot-up,  so we can:

1. Create a script for the program to the /etc/init.d directory.
    e.g. 
   // for  /usr/MyApp
   // create a script --- MyApp.sh,  edit it:
   /usr/MyApp > /dev/null  2>&1 & 

2. Make sure MyApp.sh can be execute, so:
   chmod  +x

3. Create a linke to MyApp.sh in the /etc/rc2.d   folder.
   ln -s  /etc/init.d/MyApp.sh    /etc/rc2.d/S99MyApp


OK!

 

posted @ 2007-05-30 22:46  vsignsoft  阅读(445)  评论(0编辑  收藏  举报