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

posted @ 2021-11-09 13:32  zwbsoft  阅读(208)  评论(0编辑  收藏  举报