I'm developping a dotnet core service to run in rpi4, and when i execute the service with "dotnet run rpiservice.dll" the code executes normally. So, i created a .service file and insert in /etc/systemd/system folder. Here's my file:
[Unit] Description=ANA Service [Service] ExecStart=/opt/dotnet/dotnet RpiGateway.dll WorkingDirectory=/home/stationpi/RpiGateway Restart=always RestartSec=10 User=stationpi [Install] WantedBy=multi-user.target But when i reboot rpi the service doesn't started. When i check the status with "systemctl status rpi.service" returns me "inactive(dead)".
I try many things, and when i change the WantedBy to "default.target" the service started normally on boot.
Anyone knows why multi-user.target doesn't work? Many tutorials that teach how to create a service in rpi use multi-user.target.
Thanks a lot!