sudo nano /etc/systemd/system/dotnet_project.service
[Unit] Description=dotnet project [Service] WorkingDirectory=/home/user/project ExecStart=/usr/bin/dotnet /home/user/project Restart=always RestartSec=10 SyslogIdentifier=dotnet-project User=root Environment=ASPNETCORE_ENVIRONMENT=Production [Install] WantedBy=multi-user.target
# активація sudo systemctl enable dotnet_project.service # деактивація sudo systemctl disable dotnet_project.service
sudo systemctl start dotnet_project.service
sudo systemctl stop dotnet_project.service
sudo systemctl status dotnet_project.service
© accounting.org.ua - 2024