[Pkg-mono-devel] Running Mono-App's in the Background

Mirco Bauer meebey at debian.org
Sat Nov 21 12:57:44 UTC 2009


On Fri, 20 Nov 2009 15:57:23 +0000
Jo Shields <directhex at apebox.org> wrote:

> On Fri, 2009-11-20 at 01:58 -0800, Lyra` wrote:
> > Hi,
> > i'd wrote an App (C# - Visual Studio 2008 - .NET Framewok 2.0) and
> > i want to run it at my debian-etch server all the time in the
> > background.
> > 
> > now, i start the app throught 
> > 
> > $> mono App.exe
> > 
> > and if i close putty (ssh client) the App.exe closes.
> 
> 
> Take a look at
> http://svn.debian.org/wsvn/pkg-mono/xsp/trunk/debian/mono-xsp2.init
> for inspiration - you need an init script

That's the way debian handles staring and stopping daemons but it's a
pretty heavy example.

Adding
mono myapp.exe > /var/log/myapp.log 2>&1 & 
to
/etc/rc.local

would do it too, but on server shutdown it will simply kill the process
(SIGTERM) (if that's a problem).. actually that's the default of daemon
scripts anyhow :) (via start-stop-daemon)

The cleanest approach would be to use mono-service for this, but there
are no hooks yet (in debian) which you can use. You have to setup it
yourself.... mono-service is like the windows service kind of thing, a
central place where all services are managed and monitored.

-- 
Regards,

Mirco 'meebey' Bauer

PGP-Key ID: 0xEEF946C8

FOSS Developer    meebey at meebey.net  http://www.meebey.net/
PEAR Developer    meebey at php.net     http://pear.php.net/
Debian Developer  meebey at debian.org  http://www.debian.org/



More information about the Pkg-mono-devel mailing list