mirror of https://github.com/fatedier/frp
add systemd documentation
parent
75edea3370
commit
92794353fd
|
@ -1285,6 +1285,9 @@ To enable an experimental feature, add the feature gate to your configuration:
|
||||||
```toml
|
```toml
|
||||||
featureGates = { VirtualNet = true }
|
featureGates = { VirtualNet = true }
|
||||||
```
|
```
|
||||||
|
### Enable as systemd service
|
||||||
|
|
||||||
|
Read the [document](/doc/systemd_service.md).
|
||||||
|
|
||||||
### Feature Lifecycle
|
### Feature Lifecycle
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
# Install systemd unit
|
||||||
|
|
||||||
|
## install binary
|
||||||
|
|
||||||
|
```sudo install ./frps /usr/local/bin```
|
||||||
|
|
||||||
|
## Create systemd unit
|
||||||
|
|
||||||
|
```sudo vi /lib/systemd/syste.frps.service```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```[Unit]
|
||||||
|
Description=FRP Server Service
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/local/bin/frps -c /usr/local/etc/frp/frps.toml
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=15s
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
## Enable service
|
||||||
|
|
||||||
|
```sudo systemctl daemon-reload
|
||||||
|
sudo systemctl enable frps.service
|
||||||
|
sudo systemctl start frps.service
|
||||||
|
sudo systemctl status frps.service```
|
||||||
|
|
Loading…
Reference in New Issue