[Mono-list] SPAM-LOW: Getting a service to start automatically

Lee lee at datatrakpos.com
Tue Jun 27 17:23:18 EDT 2006


Hi all, 

Sorry to beat a dead horse to death, but I cannot get my service to start at
system startup.  I've tried the script that I mentioned below to no avail.

I have for 3 days now to get my service to run automatically at start up.
The problem is that calling mono-service from a script will not work.

To test, I wrote a small console app that outputs a simple line then exits.

I then wrote a simple script like this:

=============================
#!/bin/sh

/etc/testMono.exe
=============================

And then ran:

$service starttest

And the app ran correctly.

Yet doing the same thing or even using the script detailed here:
http://lists.ximian.com/pipermail/mono-list/2005-November/029295.html

and it will just not work.  No errors that I can see and no service either,
LOL.

I even tried creating a cron job in crontab using the keyword "@reboot" and
that will work either.  

Having the app start at os start up is crucial and if I can't get it to
work, I will have to scrap all the work that I have done and use something
else other than mono/C#, which I do not want to do, LOL.

Thanks again,

Lee

> 
> 
> Hi all, 
> 
> I've have tried unsuccessfully to get a service that I wrote 
> to startup automatically via an init.d script.  I have tried 
> about every combination that I can think of, but to no avail. 
>  As it is most of the time, there has to be something that 
> I'm doing wrong, but just cannot figure out what it may be.
> 
> I've been at it for about 6 hours today and I'm done trying 
> to guess how to do this.  Travis on this list sent me a 
> script link (and eventually a script template via private 
> email) but I am unable to get either to run correctly. 
> 
> http://lists.ximian.com/pipermail/mono-list/2005-November/029295.html
> 
> I did get as far as seeing the script executed when linux 
> (CentOS 4) starts up, but the service that it is supposed to 
> start does not start at all and the script generates a bunch 
> of errors concerning rc.local not being found, etc.
> 
> Thanks for any help,
> 
> Lee
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com 
> http://lists.ximian.com/mailman/listinfo/mono-list



More information about the Mono-list mailing list