启动执行服务:
sudo systemctl start myscript.service
停止服务:
sudo systemctl stop myscript.service
设置开机时自动运行:
sudo systemctl enable myscript.service
查看服务开机自启状态
systemctl list-units --type=service
如果服务已经注册到开机自启更新配置需要使用:
systemctl daemon-reload
启动执行服务:
sudo systemctl start myscript.service
停止服务:
sudo systemctl stop myscript.service
设置开机时自动运行:
sudo systemctl enable myscript.service
查看服务开机自启状态
systemctl list-units --type=service
如果服务已经注册到开机自启更新配置需要使用:
systemctl daemon-reload