immutablue-script-orchestrator#

Execute scheduled scripts for system and user automation.

Synopsis#

immutablue-script-orchestrator <MODE>

Description#

immutablue-script-orchestrator is an internal command that runs scripts from designated directories based on a schedule. It’s typically invoked by systemd timers and services, not directly by users.

Modes#

ModeDescription
on_bootScripts run at system boot
on_shutdownScripts run at system shutdown
hourlyScripts run every hour
dailyScripts run daily
weeklyScripts run weekly
monthlyScripts run monthly

Script Directories#

Scripts are organized by scope (system vs user) and schedule:

System Scripts (run as root)#

/usr/libexec/immutablue/system/
├── on_boot/
├── on_shutdown/
├── hourly/
├── daily/
├── weekly/
└── monthly/

User Scripts (run as current user)#

/usr/libexec/immutablue/user/
├── on_boot/
├── on_shutdown/
├── hourly/
├── daily/
├── weekly/
└── monthly/

Custom Scripts#

You can add custom scripts in:

/etc/immutablue/scripts/system/<mode>/
/etc/immutablue/scripts/user/<mode>/

Writing Custom Scripts#

  1. Create a script in the appropriate directory
  2. Make it executable: chmod +x script.sh
  3. Name it with a numeric prefix for ordering (e.g., 10-my-script.sh)

Example custom daily script:

#!/bin/bash
# /etc/immutablue/scripts/user/daily/10-backup-notes.sh

rsync -av ~/Documents/notes/ ~/Backups/notes/

Systemd Integration#

The orchestrator is invoked by these systemd units:

Timer/ServiceMode
immutablue-onboot.serviceon_boot
immutablue-hourly.timerhourly
immutablue-daily.timerdaily
immutablue-weekly.timerweekly
immutablue-monthly.timermonthly

Check timer status:

systemctl list-timers --all | grep immutablue

See Also#