新建服务文件
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
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
相关课程
相关阅读