Skip to content

Instantly share code, notes, and snippets.

@zclongpop123
Created February 21, 2019 07:33
Show Gist options
  • Save zclongpop123/7160a318559e4166b5b00e535a409903 to your computer and use it in GitHub Desktop.
Save zclongpop123/7160a318559e4166b5b00e535a409903 to your computer and use it in GitHub Desktop.
# Centos 7
# 存放位置 /usr/lib/systemd/system
# 开启 systemctl start frpclient
# 关闭 systemctl stop frpclent
# 开机启动 systemctl enable frpclient
# 取消开机启动 system disable frpclient
[Unit]
Description=frp client service
Wants=network-online.target
After=network.target
[Service]
Type=simple
ExecStart=/opt/frp/0.24.1/frpc -c /opt/frp/0.24.1/frpc_alibaba.ini
# Suppress stderr to eliminate duplicated messages in syslog. NM calls openlog()
# with LOG_PERROR when run in foreground. But systemd redirects stderr to
# syslog by default, which results in logging each message twice.
StandardOutput=syslog
StandardError=null
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment