Skip to content

Run model-sync and deriver as systemd --user timers on Linux - #2815

Open
Heretic-tripto wants to merge 1 commit into
danielmiessler:mainfrom
Heretic-tripto:linux-systemd-modelsync-deriver
Open

Heretic-tripto wants to merge 1 commit into
danielmiessler:mainfrom
Heretic-tripto:linux-systemd-modelsync-deriver

Conversation

@Heretic-tripto

Copy link
Copy Markdown

Problem

Two nightly jobs only run on macOS:

  • InstallModelSync.ts calls launchctl unconditionally, so on Linux the
    install fails with Executable not found in $PATH: "launchctl". In a
    Services.ts install run this fails the core-services leg of the update.
  • manage-deriver.sh on Linux prints macOS only. Skipping and exits 0, so
    Services reports the deriver as installed while nothing is scheduled.

Change

  • InstallModelSync.ts: Linux branch on lib/SystemdUser, same shape as
    InstallHealthSync. Schedule matches the plist (daily 05:10). macOS path
    unchanged.
  • InstallDeriverSystemd.ts (new): systemd --user timer for the deriver,
    daily 03:00, same command as the launchd plist.
  • manage-deriver.sh: install|uninstall|status delegate to the systemd
    installer on non-Darwin hosts. macOS path unchanged.

Testing

  • Arch Linux (Omarchy), systemd --user: InstallModelSync.ts and
    manage-deriver.sh install both report active · enabled, with the next
    run at the scheduled time. The model-sync first run completed.
  • bash -n on the script and bun build --no-bundle parse on both TS files.
  • Not exercised: --uninstall on Linux, and anything on macOS.

🤖 Generated with Claude Code

Both nightly jobs were macOS-only. On Linux InstallModelSync.ts failed at
launchctl, and manage-deriver.sh exited 0 with "macOS only. Skipping", so
Services reported the deriver as installed when nothing was scheduled.

- InstallModelSync.ts: add a Linux branch on lib/SystemdUser (same shape as
  InstallHealthSync). Schedule matches the plist: daily 05:10.
- InstallDeriverSystemd.ts (new): systemd --user timer for the deriver,
  daily 03:00, same command as the launchd plist.
- manage-deriver.sh: delegate install/uninstall/status to the systemd
  installer on non-Darwin hosts. macOS path unchanged.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CNVp6Ee6Tan1v5P3HENTHB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant