[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: creating a custom service



Hanspeter Roth wrote:

>Hello,
>
>how can one create a custom service that is executed during the boot
>sequence?
>I guess the first step is create a script in /etc/init.d. But how is
>it then activated?
>
>-Hanspeter
>
>
>  
>
Assuming your script is /etc/init.d/foo,  you would make a symlink thusly:

ln -s /etc/init.d/foo /etc/rc2.d/S80foo

What's happening is that the symlinks in /etc/rc2.d/ which start with
the letter "S" followed by a number (00 - 99) are all of the services
which will be started when the boot process enters runlevel 2.

So,  the "S" means "start" (and a "K" means "kill") and the number
following it simply puts it in order in relation to the other symlinks
in rc2.d.  So if you want your service to start very late in the
process, you would use S99foo,  or S20foo if you want it earlier.

HTH.


-- 

Mitch Wiedemann
Webmaster - Ithaca Free Software Association
http://ithacafreesoftware.org 




Reply to: