jualhosting commited on
Commit
8e9aa0c
·
verified ·
1 Parent(s): 9b5dfdf

Upload 4 files

Browse files
Files changed (1) hide show
  1. entrypoint.sh +3 -3
entrypoint.sh CHANGED
@@ -48,7 +48,7 @@ rclone copyto "$REMOTE_NAME:.filebrowser.db" "$DB_PATH" --config "$CONFIG_PATH"
48
 
49
  # 2. Download files from Google Drive to local /data directory
50
  echo "Syncing files from Google Drive..."
51
- rclone sync "$REMOTE_NAME:" "$DATA_DIR" --config "$CONFIG_PATH" || true
52
 
53
  # 3. Start background sync loops
54
  # Loop A: Sync files in /data to Google Drive when modified
@@ -58,8 +58,8 @@ rclone sync "$REMOTE_NAME:" "$DATA_DIR" --config "$CONFIG_PATH" || true
58
  # Monitor /data for write, create, delete, or move events
59
  inotifywait -r -e modify,create,delete,move "$DATA_DIR"
60
  sleep 5
61
- echo "Changes detected in $DATA_DIR, syncing to Google Drive ($REMOTE_NAME)..."
62
- rclone sync "$DATA_DIR" "$REMOTE_NAME:" --config "$CONFIG_PATH"
63
  done
64
  ) &
65
 
 
48
 
49
  # 2. Download files from Google Drive to local /data directory
50
  echo "Syncing files from Google Drive..."
51
+ rclone copy "$REMOTE_NAME:" "$DATA_DIR" --config "$CONFIG_PATH" || true
52
 
53
  # 3. Start background sync loops
54
  # Loop A: Sync files in /data to Google Drive when modified
 
58
  # Monitor /data for write, create, delete, or move events
59
  inotifywait -r -e modify,create,delete,move "$DATA_DIR"
60
  sleep 5
61
+ echo "Changes detected in $DATA_DIR, copying to Google Drive ($REMOTE_NAME)..."
62
+ rclone copy "$DATA_DIR" "$REMOTE_NAME:" --config "$CONFIG_PATH"
63
  done
64
  ) &
65