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