What would be the best approach to migrate a .NET Windows Service to Linux using mono? I’ve been trying to avoid executing the application as a scheduled command.
Is it possible to obtain a service/system daemon(in linux) like behavior?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Under Linux, deamons are simple background processes. No special control methods (e.g
start(),stop()) are used as in Windows. Build your service as a simple (console) application, and run it in the background. Use a tool likedaemonizeto run a program as a Unix daemon, and remember to specifymonoas the program to be activated.As noted by others, mono-service is a host to run services built with the
ServiceProcessassembly. Services built for Windows can use this method to run unmodified under Linux. You can control the service by sending signals to the process (see man page).