Improve schedule and mackup reliability
- bin/ssr-schedule: use `launchctl bootstrap`/`bootout` (modern API) with legacy `load -w` fallback. The previous `load -w`-only flow silently no-op'd on macOS 10.15+ in some configurations, leaving `ssr status` reporting `inactive` after a successful `ssr schedule on`. - bin/ssr-status: query the service via `launchctl print`/`list <label>` for consistent active/inactive detection. - lib/mackup.sh: pre-materialize iCloud placeholders via `brctl download` and retry `mackup -f backup` up to three times to dodge the recurring `OSError [Errno 66] Directory not empty` race between mackup's rmtree and iCloud's filesystem provider. Soft-fails so the rest of `ssr sync` still runs even if mackup never settles; logs actionable hints. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+3
-1
@@ -31,7 +31,9 @@ else
|
||||
fi
|
||||
|
||||
label="${SSR_LAUNCHD_LABEL:-de.surke.ssr.sync}"
|
||||
if launchctl list 2>/dev/null | grep -q "$label"; then
|
||||
service_target="gui/$(id -u)/${label}"
|
||||
if launchctl print "$service_target" >/dev/null 2>&1 \
|
||||
|| launchctl list "$label" >/dev/null 2>&1; then
|
||||
echo " schedule: active ($label)"
|
||||
else
|
||||
echo " schedule: inactive"
|
||||
|
||||
Reference in New Issue
Block a user