Created
March 6, 2018 18:03
-
-
Save someburner/2c119278776a1b97890ffb9b4cb28737 to your computer and use it in GitHub Desktop.
install frps
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
#!/bin/bash | |
systemctl daemon-reload | |
systemctl stop frps.service || true | |
touch /lib/systemd/system/frps.service | |
ENVPGM=/usr/bin/nohup | |
FRPS=/root/go/bin/frps | |
FRPS_CONF=/root/go/init.d/frps.ini | |
FRPS_LOG=/var/log/frps.log | |
# --- frps.service --- # | |
cat >/lib/systemd/system/frps.service <<TAGFOREOF | |
[Unit] | |
Description=Frp Server | |
After=network.target | |
[Service] | |
Type=simple | |
ExecStart=$ENVPGM $FRPS -c $FRPS_CONF -L $FRPS_LOG --log-level=info | |
Restart=always | |
RestartSec=30 | |
[Install] | |
WantedBy=multi-user.target | |
TAGFOREOF | |
# --- /frps.service --- # | |
systemctl daemon-reload | |
systemctl enable frps.service | |
systemctl reload-or-restart frps.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment