cd /usr/lib/systemd/system
chmod u+x xxx.service
[Unit]
Description=dashboard system
After=NetworkManager.service
[Service]
Type=forking
ExecStart= 启动服务的命令或者脚本
ExecStop= 进行服务的命令或者脚本
PrivateTmp=true
[Install]
WantedBy=multi-user.target
systemctl enable xxx
systemctl daemon-reload