joken-前端工程师

  博客园 :: 首页 :: 新随笔 :: :: :: 管理 ::

开机自启

以下使用Systemd来实现***开机自启。

sudo vim /etc/systemd/system/***.service

在里面填写如下内容:

[Unit]
Description=*** Client Service
After=network.target

[Service]
Type=simple
User=root
ExecStart=/usr/bin/sslocal -c /home/xx/Software/***/***.json

[Install]
WantedBy=multi-user.target

/home/xx/Software/***/***.json修改为你的***.json路径,如:/etc/***.json

 

 

 

配置生效:

systemctl enable /etc/systemd/system/***.service
posted on 2018-07-03 01:15  joken1310  阅读(206)  评论(0)    收藏  举报