add systemd documentation

pull/4776/head
Dmitry Malinin 2025-04-29 09:22:10 +03:00
parent 0a829b757b
commit fc8b915a23
1 changed files with 15 additions and 7 deletions

View File

@ -2,15 +2,20 @@
## install binary ## install binary
```sudo install ./frps /usr/local/bin``` ```
sudo install ./frps /usr/local/bin
```
## Create systemd unit ## Create systemd unit
```sudo vi /lib/systemd/syste.frps.service``` ```
sudo vi /lib/systemd/syste.frps.service
```
add inside
```
```[Unit] [Unit]
Description=FRP Server Service Description=FRP Server Service
After=network.target After=network.target
@ -21,12 +26,15 @@ Restart=on-failure
RestartSec=15s RestartSec=15s
[Install] [Install]
WantedBy=multi-user.target``` WantedBy=multi-user.target
```
## Enable service ## Enable service
```sudo systemctl daemon-reload ```
sudo systemctl daemon-reload
sudo systemctl enable frps.service sudo systemctl enable frps.service
sudo systemctl start frps.service sudo systemctl start frps.service
sudo systemctl status frps.service``` sudo systemctl status frps.service
```