Last active
September 3, 2021 14:41
-
-
Save anselanza/59f55d9cb2cae4a8cba4bbad1ab33ca8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on https://gist.github.com/imyelo/b6c3d3d9383f7d5623f06a0c11052530 | |
# Added restart settings, which are super important! | |
# `sudo mkdir /usr/local/frp` | |
# Copy both frpc and frpc.ini under /usr/local/frp/ | |
# Create this file (frpc.service) at /etc/systemd/system, i.e. `sudo nano /etc/systemd/system/frpc.service` | |
# run `sudo systemctl daemon-reload && sudo systemctl enable frpc` | |
# run `sudo systemctl start frpc` | |
# Then we can manage frpc with `sudo service frpc {start|stop|restart|status}` | |
[Unit] | |
Description=Frp Client Service | |
After=network.target | |
[Service] | |
Type=simple | |
User=nobody | |
Restart=on-failure | |
RestartSec=5s | |
ExecStart=/usr/local/frp/frpc -c /usr/local/frp/frpc.ini | |
ExecReload=/usr/local/frp/frpc reload -c /usr/local/frp/frpc.ini | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment