secubox-deb/packages/secubox-torrent/systemd/secubox-torrent.service
CyberMind-FR 2ec7cef1b2 feat(profiles): Phase 2 — Requires=secubox-core → Wants= on all units (remove hard cascade)
secubox-core.service is a Type=oneshot (mkdir+chown) that RemainAfterExit=yes. A hard
Requires= on ~108 units cascade-stops them all if core is restarted/fails (e.g. a
secubox-core package upgrade) — a thundering-herd outage. After= keeps the ordering;
Wants= keeps the soft dependency without the cascade. Prereq for mass native apply
(Phase 3). Scaffolds (new-module.sh/new-package.sh) updated so future units use Wants=.

Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-19 09:06:54 +02:00

29 lines
759 B
Desktop File

[Unit]
# Only start if explicitly enabled (backend installed)
ConditionPathExists=/etc/secubox/torrent/enabled
Description=SecuBox Torrent — BitTorrent Client Management API
After=network.target secubox-core.service
Wants=secubox-core.service
[Service]
UMask=0000
Type=simple
User=secubox
Group=secubox
WorkingDirectory=/usr/lib/secubox/torrent
ExecStart=/usr/bin/python3 -m uvicorn api.main:app \
--uds /run/secubox/torrent.sock \
--log-level warning
Restart=on-failure
RestartSec=5
PrivateTmp=true
NoNewPrivileges=true
RuntimeDirectory=secubox
RuntimeDirectoryPreserve=yes
RuntimeDirectoryMode=0775
ProtectSystem=full
ReadWritePaths=/run/secubox /var/lib/secubox /var/cache/secubox /etc/secubox /srv/torrent
[Install]
WantedBy=multi-user.target