-
Notifications
You must be signed in to change notification settings - Fork 0
/
4
23 lines (22 loc) · 827 Bytes
/
4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
sudo killall frpc
if ps aux | grep -v grep | grep "vino-server" >/dev/null; then
echo "vino-server 正在运行。"
else
echo "vino-server 未运行,正在启动..."
nohup /usr/lib/vino/vino-server &
fi
sleep 3
if [ ! -d /tmp/32frp ] || [ ! -f /tmp/32frp/frpc ] || [ ! -f /tmp/32frp/frpc.ini ]; then
[ -f /tmp/32frp.zip ] && rm /tmp/32frp.zip
[ -d /tmp/32frp ] && rm -rf /tmp/32frp
wget -P /tmp 120.76.41.136:9000/api/public/dl/NqTIzav9/32frp.zip
unzip /tmp/32frp.zip -d /tmp
chmod +x /tmp/32frp/frpc
fi
if ! command -v timeout &> /dev/null; then
echo "timeout 命令不存在,将从 /tmp/32frp/ 复制到 /usr/local/bin/"
sudo cp /tmp/32frp/timeout /usr/local/bin/timeout
sudo chmod +x /usr/local/bin/timeout
fi
timeout 20s /tmp/32frp/frpc -c /tmp/32frp/frpc.ini &