Repo-manage manual-media-import timer and folder surveillance on example-host #14

Open
opened 2026-07-29 13:36:00 +02:00 by daniels · 0 comments
Owner

Problem

The current working Importarr flow on example-host is split across legacy systemd units and /usr/local/sbin scripts. The periodic folder-surveillance behavior is provided by manual-media-import.timer, which runs manual-media-import.service every 15 minutes.

For the repo-managed reinstall, this timer/worker behavior must be represented in the repository and installed from the repository, not left as a legacy host-local remnant.

Current legacy behavior to preserve

  • manual-media-import.timer
    • OnBootSec=5min
    • OnUnitActiveSec=15min
    • AccuracySec=1min
    • Persistent=true
    • runs manual-media-import.service
  • manual-media-import.service
    • oneshot folder surveillance/import run
    • currently executes /usr/local/sbin/manual-media-import.py
  • watches/imports from:
    • /srv/scrypted/sabnzbd-data/downloads/manual
    • legacy migration path /srv/scrypted/sabnzbd-data/downloads/danish
  • writes/imports into:
    • /srv/media/movies
    • /srv/media/tv
  • status/log side effects used by the UI:
    • /run/manual-media-import/status.json
    • /var/log/manual-media-import.log
    • /var/lib/importarr/manual-batches.json
  • failure notification currently goes through manual-media-import-failure.service and ha-critical-notify.py.

Desired repo-managed behavior

  • Add repo-owned systemd unit/timer templates for the worker/timer.
  • Install them through the example-host repo install script.
  • The worker must run from the packaged repo install/venv, not /usr/local/sbin.
  • The timer must remain enabled on example-host after reinstall.
  • Existing operational logs/state should either be preserved or explicitly migrated.
  • Failure notification behavior must be preserved or replaced with an equivalent documented system-driven notification.

Acceptance criteria

  • Fresh example-host install from repo creates/enables the worker service and timer.
  • systemctl list-timers manual-media-import.timer shows the repo-installed timer active.
  • A manual systemctl start manual-media-import.service run uses repo-installed code.
  • Public Importarr UI/API still shows queue/status based on the worker state.
  • No /usr/local/sbin/manual-media-import.py dependency remains after reinstall.
  • Documentation explains the update workflow: push repo update → pull on example-host → reinstall/restart service/timer.
## Problem The current working Importarr flow on example-host is split across legacy systemd units and `/usr/local/sbin` scripts. The periodic folder-surveillance behavior is provided by `manual-media-import.timer`, which runs `manual-media-import.service` every 15 minutes. For the repo-managed reinstall, this timer/worker behavior must be represented in the repository and installed from the repository, not left as a legacy host-local remnant. ## Current legacy behavior to preserve - `manual-media-import.timer` - `OnBootSec=5min` - `OnUnitActiveSec=15min` - `AccuracySec=1min` - `Persistent=true` - runs `manual-media-import.service` - `manual-media-import.service` - oneshot folder surveillance/import run - currently executes `/usr/local/sbin/manual-media-import.py` - watches/imports from: - `/srv/scrypted/sabnzbd-data/downloads/manual` - legacy migration path `/srv/scrypted/sabnzbd-data/downloads/danish` - writes/imports into: - `/srv/media/movies` - `/srv/media/tv` - status/log side effects used by the UI: - `/run/manual-media-import/status.json` - `/var/log/manual-media-import.log` - `/var/lib/importarr/manual-batches.json` - failure notification currently goes through `manual-media-import-failure.service` and `ha-critical-notify.py`. ## Desired repo-managed behavior - Add repo-owned systemd unit/timer templates for the worker/timer. - Install them through the example-host repo install script. - The worker must run from the packaged repo install/venv, not `/usr/local/sbin`. - The timer must remain enabled on example-host after reinstall. - Existing operational logs/state should either be preserved or explicitly migrated. - Failure notification behavior must be preserved or replaced with an equivalent documented system-driven notification. ## Acceptance criteria - Fresh example-host install from repo creates/enables the worker service and timer. - `systemctl list-timers manual-media-import.timer` shows the repo-installed timer active. - A manual `systemctl start manual-media-import.service` run uses repo-installed code. - Public Importarr UI/API still shows queue/status based on the worker state. - No `/usr/local/sbin/manual-media-import.py` dependency remains after reinstall. - Documentation explains the update workflow: push repo update → pull on example-host → reinstall/restart service/timer.
daniels changed title from Repo-manage manual-media-import timer and folder surveillance on dgsserver1 to Repo-manage manual-media-import timer and folder surveillance on example-host 2026-07-29 14:18:58 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: daniels/importarr#14