secubox-deb/packages/secubox-profiles/debian/rules
CyberMind-FR 7b8fd5f1e3 fix(profiles): secubox-sleeper ships DISABLED (pilot; never auto-sleep crowdsec) (ref #896)
The postinst enabled+started the sleeper, which stops idle sleepable modules —
and health-sync currently lists crowdsec among sleepable. Ship it disabled
(--no-enable --no-start; postinst try-restart only, never enable). Operator
opts in after auditing the sleepable set. Waker stays enabled (never stops).

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

27 lines
1.4 KiB
Makefile
Executable File

#!/usr/bin/make -f
%:
dh $@
# Sudoers drop-in so the panel (User=secubox) can sudo -> secubox-profilectl
# for apply/rollback (webui->ctl). debian/install still handles the regular
# file listing via dh_install; this override only adds the sudoers file.
override_dh_auto_install:
install -d debian/secubox-profiles/etc/sudoers.d
install -m 0440 sudoers.d/secubox-profiles debian/secubox-profiles/etc/sudoers.d/secubox-profiles
# Three distinct units ship in this package (own socket each — see
# debian/secubox-profiles.service, debian/secubox-waker.service,
# debian/secubox-sleeper.service): dh_installsystemd's default naming only
# auto-picks up debian/<pkgname>.service, so the other two need an explicit
# --name= each. Default enable+start (no --no-enable) matches how
# secubox-profiles.service already behaves (postinst also enables/restarts
# it manually — same, deliberately redundant-but-safe pattern kept below).
override_dh_installsystemd:
dh_installsystemd --name=secubox-profiles
dh_installsystemd --name=secubox-waker
# secubox-sleeper ships DISABLED (--no-enable --no-start): it stops idle
# sleepable modules, so it must be enabled deliberately by the operator only
# after the deployment's lifecycle assignments are audited (a security
# service like crowdsec must never be on-demand). See debian/postinst.
dh_installsystemd --no-enable --no-start --name=secubox-sleeper