CentOS7利用systemctl添加dotnet后台服务

/usr/lib/systemd/system/zl.service

systemctl enable zl.service

systemctl start zl.service

[Unit]
Description=zl System Service
After=network.target

[Service]
WorkingDirectory=/home/ZL
Type=simple
User=root
Group=root
ExecStart=/usr/bin/dotnet /home/ZL/JieYun.Web.dll
Restart=always
RestartSec=10
SyslogIdentifier=dotnet-zl
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false

[Install]
WantedBy=multi-user.target

posted @ 2019-10-29 22:18  接云网络  阅读(818)  评论(0编辑  收藏  举报