Qilan2 commited on
Commit
24c32e8
·
verified ·
1 Parent(s): 762a076

Update sync.sh

Browse files
Files changed (1) hide show
  1. sync.sh +1 -1
sync.sh CHANGED
@@ -21,7 +21,7 @@ echo "使用的 FRP URL: $FRP_URL"
21
 
22
  while true; do
23
  # 使用 timeout 限制 ssh 的执行时间(例如设置为60秒)
24
- if timeout 60 ssh -p "$SSH_PORT" root@"$FRP_URL" "inotifywait -r -e modify,create,delete --format '%w%f' $REMOTE_DIR"; then
25
 
26
  # 如果 ssh 成功,进入文件变化监控循环(注意这里需要将读取输入放到外部)
27
  while read FILE; do
 
21
 
22
  while true; do
23
  # 使用 timeout 限制 ssh 的执行时间(例如设置为60秒)
24
+ if timeout 60 ssh -p "$SSH_PORT" root@"$FRP_URL" "inotifywait -r -e modify,create,delete --format '%w%f' --timeout 60 $REMOTE_DIR"; then
25
 
26
  # 如果 ssh 成功,进入文件变化监控循环(注意这里需要将读取输入放到外部)
27
  while read FILE; do