0

I have a Windows service that I want to run with Mono on Linux. I can run it as a service using mono-service, and this works fine.

I also want to mkbundle the application to ease deployment for end-users, so they don't need to mess around installing Mono themselves.

What is the recommended way to run the resulting native binaries as a service on Linux, while still handling the OnStart and OnStop events?

Cocowalla
  • 13,822
  • 6
  • 66
  • 112

1 Answers1

0

mkbundle produces native code, so you can run the way you used to run the executable on the original platform. It will only be an executable you might have to add it as service on linux yourself after creating an init.d script.

had to add it as an answer, as i can't add comments

PradyJord
  • 2,136
  • 12
  • 19
  • If I just run it, presumably it won't respond correctly to service start and stop requests (i.e. `OnStart` and `OnStop` from `System.ServiceProcess.ServiceBase` won't fire). Is there some other way to handle 'stop' and 'start' requests? I'm willing to swap out the Windows-specific `ServiceBase` stuff if I must – Cocowalla Apr 20 '14 at 17:08