Open cndaqiang opened 4 years ago
[Unit]
Description=Frpc Client
Wants=network-online.target
After=network-online.target
[Service]
User=root
WorkingDirectory=/opt/
LimitNOFILE=4096
PIDFile=/var/run/frpc/client.pid
ExecStart=/opt/frp/frpc -c /opt/frp/frpc.ini
Restart=on-failure
StartLimitInterval=600
[Install]
WantedBy=multi-user.target
cat > /etc/systemd/system/rc-local.service <<EOF
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Alias=rc-local.service
EOF
cat > /etc/rc.local <<EOF
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
exit 0
EOF
chmod +x /etc/rc.local
systemctl enable rc-local
systemctl start rc-local.service
shell 窗口过小,容易看不全出错原因
![image](https://user-images.githubusercontent.com/26620270/66205640-7b777580-e6e0-11e9-9f70-0d77f1938ee8.png)