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 like daemonize
to run a program as a Unix daemon, and remember to specify mono
as the program to be activated.
As noted by others, mono-service is a host to run services built with the ServiceProcess
assembly. 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).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…