Skip to content

Commit 0f83989

Browse files
author
Jonathan D.A. Jewell
committed
Auto-commit: Sync changes [2026-02-24]
1 parent 73f5cbb commit 0f83989

3 files changed

Lines changed: 17 additions & 10 deletions

File tree

src/cloud-sync-tuner

313 KB
Binary file not shown.

src/cloud_sync_tuner.adb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,17 @@ procedure Cloud_Sync_Tuner is
100100
Services : constant Service_Array (1 .. 3) := (
101101
1 => (To_Unbounded_String ("Dropbox"),
102102
To_Unbounded_String ("dropbox:"),
103-
To_Unbounded_String ("/run/media/hyper/eclipse/Cloud/Dropbox"),
103+
To_Unbounded_String ("/var/home/hyper/Cloud/Dropbox"),
104104
To_Unbounded_String ("rclone-dropbox"),
105105
True),
106106
2 => (To_Unbounded_String ("Google Drive"),
107107
To_Unbounded_String ("gdrive:"),
108-
To_Unbounded_String ("/run/media/hyper/eclipse/Cloud/GoogleDrive"),
108+
To_Unbounded_String ("/var/home/hyper/Cloud/GoogleDrive"),
109109
To_Unbounded_String ("rclone-gdrive"),
110110
True),
111111
3 => (To_Unbounded_String ("OneDrive"),
112112
To_Unbounded_String ("onedrive:"),
113-
To_Unbounded_String ("/run/media/hyper/eclipse/Cloud/OneDrive"),
113+
To_Unbounded_String ("/var/home/hyper/Cloud/OneDrive"),
114114
To_Unbounded_String ("rclone-onedrive"),
115115
True)
116116
);
@@ -841,9 +841,9 @@ procedure Cloud_Sync_Tuner is
841841
delay 1.0;
842842

843843
when 'g' | 'G' =>
844-
Smart_Config.TPS_Limit := 8;
845-
Smart_Config.TPS_Burst := 2;
846-
Smart_Config.Chunk_Size_MB := 64;
844+
Smart_Config.TPS_Limit := 4;
845+
Smart_Config.TPS_Burst := 1;
846+
Smart_Config.Chunk_Size_MB := 32;
847847
Put_Line (Green & " Applied Google Drive optimized rate limits" & Reset);
848848
delay 1.0;
849849

@@ -1486,9 +1486,9 @@ procedure Cloud_Sync_Tuner is
14861486
Smart_Config.TPS_Burst := 1;
14871487
Smart_Config.Chunk_Size_MB := 32;
14881488
elsif Preset = "gdrive" then
1489-
Smart_Config.TPS_Limit := 8;
1490-
Smart_Config.TPS_Burst := 2;
1491-
Smart_Config.Chunk_Size_MB := 64;
1489+
Smart_Config.TPS_Limit := 4;
1490+
Smart_Config.TPS_Burst := 1;
1491+
Smart_Config.Chunk_Size_MB := 32;
14921492
elsif Preset = "onedrive" then
14931493
Smart_Config.TPS_Limit := 6;
14941494
Smart_Config.TPS_Burst := 2;

systemd/cloud-sync-watchdog.service

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,19 @@ Documentation=https://github.com/hyperpolymath/cloud-sync-tuner
66
[Service]
77
Type=oneshot
88
ExecStart=/bin/bash -c '\
9+
declare -A mounts=( \
10+
["rclone-dropbox"]="/var/home/hyper/Cloud/Dropbox" \
11+
["rclone-gdrive"]="/var/home/hyper/Cloud/GoogleDrive" \
12+
["rclone-onedrive"]="/var/home/hyper/Cloud/OneDrive" \
13+
); \
914
for svc in rclone-dropbox rclone-gdrive rclone-onedrive; do \
1015
if systemctl --user is-active --quiet "$svc.service" 2>/dev/null; then \
1116
continue; \
1217
fi; \
1318
if systemctl --user is-enabled --quiet "$svc.service" 2>/dev/null; then \
14-
echo "Restarting $svc..."; \
19+
echo "Watchdog: Cleaning up $svc mount at ${mounts[$svc]}..."; \
20+
fusermount -uz "${mounts[$svc]}" 2>/dev/null || true; \
21+
echo "Watchdog: Restarting $svc..."; \
1522
systemctl --user start "$svc.service" || true; \
1623
if command -v notify-send >/dev/null 2>&1; then \
1724
notify-send -u normal "Cloud Sync" "Restarted $svc after failure"; \

0 commit comments

Comments
 (0)