【内网穿透】神卓互联Linux客户端设置开启自启动,很简单

神卓互联在Linux系统如何设置成服务已经开机自动重启

神卓互联是一款优秀的内网穿透软件,可以快速实现外网访问局域网里的应用,无需公网IP,使用的客户比较多,很多用户在第一次使用神卓互联的时候不会设置Linux服务和自启动。

第一步:编写脚本:

vi /etc/systemd/system/shenzhuo.service

第二步:设置启动脚本

[Unit]
Description=shenzhuohulian Service
After=network.target
[Service]
Type=simple
WorkingDirectory=/usr/local/shenzhuo
ExecStart=/usr/local/shenzhuo/client 18800000000 123456
ExecStop=/bin/kill -2
Restart=always
StartLimitBurst=0
[Install]
WantedBy=multi-user.target

第三步:脚本设置好之后执行启动命令

systemctl daemon-reload
systemctl restart shenzhuo
systemctl enable shenzhuo

如,停止服务

systemctl stop shenzhuo

重启服务

systemctl restart shenzhuo

猜你喜欢

转载自blog.csdn.net/u010905359/article/details/128329639
今日推荐