码迷,mamicode.com
首页 > 其他好文 > 详细

Jumpserver之设置开机自启动

时间:2019-04-23 11:00:11      阅读:984      评论:0      收藏:0      [点我收藏+]

标签:redis   rip   开机自启   lib   oca   file   pre   environ   py3   

  

vi /usr/lib/systemd/system/jms.service
[Unit]
Description=jms
After=network.target mariadb.service redis.service
Wants=mariadb.service redis.service

[Service]
Type=forking
Environment="PATH=/opt/py3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin"
ExecStart=/opt/jumpserver/jms start all -d
ExecReload=
ExecStop=/opt/jumpserver/jms stop

[Install]
WantedBy=multi-user.target

  

 vi /usr/lib/systemd/system/coco.service
[Unit]
Description=coco
After=network.target jms.service

[Service]
Type=forking
PIDFile=/opt/coco/coco.pid
Environment="PATH=/opt/py3/bin"
ExecStart=/opt/coco/cocod start -d
ExecReload=
ExecStop=/opt/coco/cocod stop

[Install]
WantedBy=multi-user.target

   设置开启自启动

systemctl enable jms
systemctl enable coco

  

Jumpserver之设置开机自启动

标签:redis   rip   开机自启   lib   oca   file   pre   environ   py3   

原文地址:https://www.cnblogs.com/minseo/p/10755032.html

(0)
(1)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!