nbugs commited on
Commit
20446e0
·
verified ·
1 Parent(s): 12a9e4d

Update sync_data.sh

Browse files
Files changed (1) hide show
  1. sync_data.sh +17 -0
sync_data.sh CHANGED
@@ -7,6 +7,23 @@ if [[ -z "$HF_TOKEN" ]] || [[ -z "$DATASET_ID" ]]; then
7
  exit 0
8
  fi
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  # 激活虚拟环境
11
  source /opt/venv/bin/activate
12
 
 
7
  exit 0
8
  fi
9
 
10
+
11
+ # 检查Tunnel
12
+ check_tunnel() {
13
+ while ! curl -s http://localhost:7860 >/dev/null; do
14
+ echo "Waiting for Cloudflare Tunnel to be ready..."
15
+ sleep 5
16
+ done
17
+ }
18
+
19
+ # 检查环境变量
20
+ if [[ -z "$HF_TOKEN" ]] || [[ -z "$DATASET_ID" ]]; then
21
+ echo "Starting without backup functionality - missing HF_TOKEN or DATASET_ID"
22
+ exec /start.sh
23
+ exit 0
24
+ fi
25
+
26
+
27
  # 激活虚拟环境
28
  source /opt/venv/bin/activate
29