netcore 国产涉密机开机 自启动脚本打包

打包deb的服务
1.创建文件夹test/etc/systemd/system/
2.system下创建服务 start.service
[Unit]
Description=IoTSharp running on loongson
[Service]

WorkingDirectory=/home/lost+found/sythams_core/djbfbreg
ExecStart=/usr/bin/dotnet /home/lost+found/sythams_core/djbfbreg/AMS.dll --urls http://*:8001
RestartSec=10

#Restart=always
Type=simple
# Restart service after 10 seconds if the IoTSharp service crashes:
[Install]
WantedBy=multi-user.target
3.运行 ./automake-deb-package.sh /test/ 按照提示生成.deb
4.安装 该deb
5.启动systemctl start start.service
6.设置开机自启动systemctl enable start.service
7.查看状态systemctl status start.service

本文来自博客园,作者:zwbsoft,转载请注明原文链接:https://www.cnblogs.com/zwbsoft/p/15528462.html

电话微信:13514280351
原文地址:https://www.cnblogs.com/zwbsoft/p/15528462.html