在/lib/systemd/system目录新建你的自启动的service
[Unit]
Description=frapc service
Wants=network-online.target
After=network.target network-online.target
Requires=network-online.target
[Service]
Type=simple
#启动服务的命令(此处写你的frps的实际安装目录)
ExecStart=/home/pi/software/frp_0.32.0_linux_arm/frpc -c /home/pi/software/frp_0.32.0_linux_arm/frpc.ini
Restart=always
RestartSec=5
StartLimitInterval=0
[Install]
WantedBy=multi-user.target
执行bash
sudo systemctl status frps
sudo systemctl enable frps
sudo systemctl start frps
网友评论