Getting started building a systemd service.
Execute dotnet build
on the command line.
Execute dotnet run
on the command line to run as a console application.
To run as a service, copy the project1.service file to ~/.config/systemd/user/
. Run 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