宝塔面板7.7版本原版安装脚本
wget -O install.sh http://down.freenn.com/sh/bt/install_7.7.sh && bash install.sh
wget -O install.sh http://down.freenn.com/sh/bt/install_7.7.sh && bash install.sh
bash <(curl -fsSL http://down.freenn.com/sh/warp/warp.sh) menu
wget http://down.freenn.com/sh/speedtest/speedtest.py
chmod a+rx speedtest.py
./speedtest.py
先新建启动脚本/etc/systemd/system/vpnserver.service
[Unit]
Description=SoftEther VPN Server
After=network.target
[Service]
Type=forking
ExecStart=/root/vpnserver/vpnserver start
ExecStop=/root/vpnserver/vpnserver stop
[Install]
WantedBy=multi-user.target
然后就可以通过systemctl start vpnserver
启动了,并通过systemctl enable vpnserver
设置开机自启。
使用systemctl来控制启动
sudo vim /lib/systemd/system/frpc.service
在frps.service里写入以下内容
[unit]
Description=frpc
After=multi-user.targe
[Service]
TimeoutStartSec=30
ExecStart=/root/frpc/frpc -c /root/frpc/frpc.ini
ExecStop=/bin/kill $MAINPID
[Install]
WantedBy=multi-user.target
更新服务文件
sudo systemctl daemon-reload
开启
sudo systemctl start frpc
关闭
sudo systemctl stop frpc
重启
sudo systemctl restart frpc
查看状态
sudo systemctl status frpc
设置开机启动
sudo systemctl enable frpc
设置开机不启动
sudo systemctl disable frpc