[Mono-list] Linux 'services'
Morten Krog
fafner@fafner-net.dk
Tue, 08 Jun 2004 22:33:44 +0200
On Tue, 2004-06-08 at 19:50, Bailo, John wrote:
> I write a lot of windows services in c#
>
> Now that I am learning mono -- can you tell me:
>
> 1. What is the equivalent for linux?
A program like any other program. Linux does not have services per se. A
service is simply a program that is started when the machine boots in a
given runlevel.
Usually such programs are launched from /etc/init.d/
RedHat distros ships with a script called chkconfig in /sbin/chkconfig
that can add your program to the services of the machine.
It is standard to wrap your program in a shell script that launches the
program itself and make it behave like a service. Everytime I have to
make such a script I take a look at the redhat apache launch script in
/etc/init.d/httpd.
Disclaimer: Other distros might organise all this differently -- I'm not
that experienced with all the different distros.
> 2. Does monodevelop have a template for Linux services?
Yes and no. Yes because it is just a regular program; no because the
shell-script wrapping you have to do yourself.
> 3. Is there a tutorial or article you can point me to ?
Google is your friend; other that that take a look at how other services
are started.
Regards,
Morten Krog
>
> ____________________
> AIM: bailoja
>