Mount Watcher CLI to Auto Import
The starskymountwatchercli feature runs as a background watcher for mounted camera media. When a camera SD card (or similar storage) is connected, it can automatically trigger import.
This is useful when you want an always-on ingest flow without manually starting each import.
Overview
- Listens for mount events.
- Detects whether a mounted volume is likely camera storage.
- Starts import only for matching camera volumes.
- Supports installation as an OS service.
How camera detection works
The mount watcher uses the same camera-storage heuristics as the importer:
- Volume is ready and accessible.
- Filesystem is camera-friendly (for example FAT or exFAT variants).
- Camera folder structure is detected (for example
DCIMor similar patterns).
Only when checks pass, import starts.
CLI options
starskymountwatchercli --help
starskymountwatchercli --install
starskymountwatchercli --uninstall
starskymountwatchercli --status
Additional flags:
--helpor-hto print usage and platform-specific service notes.
Platform support
- macOS: launchd LaunchAgent install/uninstall flow.
- Linux: systemd service install/uninstall flow (with user-level fallback).
- Windows: Windows Service install/uninstall flow via
sc.exe.
Typical workflow
- Install and start the service.
- Insert an SD card or connect camera storage.
- Watcher receives mount event.
- Camera checks pass.
- Import starts automatically.
Operational notes
- macOS may require Full Disk Access for stable operation on external media.
- Linux logs are visible with
journalctlfor the mount watcher service. - Windows logs are available in Event Viewer.
Delete after import
When importing from mounted camera storage (for example via the mount watcher), Starsky can optionally delete the original files after a successful import.
Set the option in appsettings.json:
"ImportMountWatcher" : {
"DeleteAfter": "false"
}
Or override with an environment variable:
"app__ImportMountWatcher__DeleteAfter": "true"
When DeleteAfter is true, successfully imported files on the mounted device will be removed. Use this with caution — enable only when you want files removed from the source device after import.