新建服务文件

sudo nano /usr/lib/systemd/system/xx_net.service

[Unit]

Description=xx_net

[Service]

Type=oneshot

ExecStart=/home/pi/Desktop/XX-Net/start

[Install]

WantedBy=multi-user.target

指定服务自启动

sudo systemctl enable xx_net.service

file


zhangsheng377
4 声望0 粉丝