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

Nikki Locke nikki at trumphurst.com
Wed Jun 28 15:21:18 EDT 2006


Let me get this straight.

You have a shell script, containing the following text...

#!/bin/sh 
 
/opt/mono-1.1.15/bin/mono-service /path/to/my/exe 

If you execute that script, nothing happens (you get back to the prompt, and 
the service isn't running).

However, if you type 

/opt/mono-1.1.15/bin/mono-service /path/to/my/exe 

at a command prompt, the service starts running.

That's wierd!

You didn't edit the script using a Windows/DOS editor, which put carriage 
returns at the end of each line, did you?

Try running

dos2unix shellscriptname

then try the script again.

If that doesn't work, then try writing a different shell script, which does 
something completely different ...

#!/bin/sh
ls /

Will that run? What output does it give?

-- 
Nikki Locke, Trumphurst Ltd.      PC & Unix consultancy & programming
http://www.trumphurst.com/




More information about the Mono-list mailing list