Getting started building a systemd service.
dotnet build on the command line.
dotnet run on the command line to run as a console application.
To run as a service, copy the project1.service file to
systemctl start --user project1.service to start.
To publish, run
sudo dotnet publish -o /opt/Project1
This service writes "Hello World!" every 2 seconds. You can see this by running
systemctl status --user project1.service