标签:unit 自启 des rest work desc 查看 code target
vim frps.service
[Unit]
Description=Frp Server Service
After=network.target syslog.target
[Service]
Type=simple
User=root
Restart=on-failure
RestartSec=5s
ExecStart=/frp_0.28.2_linux_amd64/frps -c /frp_0.28.2_linux_amd64/frps.ini
[Install]
WantedBy=multi-user.target
解释:唯一需要修改的就是
ExecStart
改成你自己本机的路径
cd /lib/systemd/system & ln -s /frp_0.28.2_linux_amd64/systemd/frps.service .
systemctl start frps
查看状态:
systemctl status frps
终止启动项:systemctl stop frps
标签:unit 自启 des rest work desc 查看 code target
原文地址:https://www.cnblogs.com/TianyuSu/p/13223984.html