DoubleLi

qq: 517712484 wx: ldbgliet

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

[Unit]
Description=monitor sg_ai_framework_box
After=network.target

[Service]
User=root
Type=forking
ExecStart=/data/script/run/start.sh
ExecStop=/data/script/run/stop.sh
PrivateTmp=true
Restart=always

[Install]
WantedBy=multi-user.target

 

1.启动nfs服务

systemctl start nfs-server.service

 

2.设置开机自启动

systemctl enable nfs-server.service

 

3.停止开机自启动

systemctl disable nfs-server.service

 

4.查看服务当前状态

systemctl status nfs-server.service

 

5.重新启动某服务

systemctl restart nfs-server.service

 

6.查看所有已启动的服务

systemctl list -units --type=service

posted on 2023-12-05 14:06  DoubleLi  阅读(5)  评论(0编辑  收藏  举报