netcore centos unit服务文件

[Unit] Description=apinetcore web1  [Service] ExecStart=/usr/bin/dotnet /opt/netcore/publish/WebApplication1.dll Restart=always # Restart service after 10 seconds if the dotnet service crashes: RestartSec=10 SyslogIdentifier=WebApplication1 User=root Environment=ASPNETCORE_ENVIRONMENT=Production  [Install] WantedBy=multi-user.target