Using PLCnext Yocto Sysvinit to start a dotnet service.
Hello,
What is the best practice to start a C# DotNet service using SysvInit ? I would prefer using use a modern system like “systemd”, but as your Yocto configuration comes with SysvInit, and that there is not much documentation on how using this service framework to start dotnet application, I wonder if you know how to do it.
I am fully open to suggestions.
(Note that I already know how to start a dotnet console app on PLCnext and know the basic of SysvInit).
Thanks,
Frédéric
Using 2020.0.1 framework
Comments
Hello Frederic,
I dont think that this is anything different for .NetCore binaries then for other System Init Processes.
So the best practice for init.d is to provide a update-rc compatible init script and using the start-stop-daemon to setup your binary.
Search for Sysv init.d tutorials and update-rc.
/etc/init.d/skeleton
....
...
....
Depending on your application you might also think about providing it as a Daemon App.
For easier deployment to your PLCs via the WBM...
https://github.com/PLCnext/PLCnextAppExamples/tree/public/DemoApps
Thanks Oliver. I will look at theses examples soon.
I finally made it work using traditional SysVinit scripting (i.e. without using the command "start-stop-daemon" like the nginx script does)