- Upgrade path restarts only fenris-collect.timer, not fenris-collect.service (spec §7: "a running oneshot finishes on its old interpreter") - Remove redundant deb depends override in nfpm.yaml (top-level is sufficient) - Remove common.sh sourcing — scripts are self-contained to avoid path dependency when dpkg/rpm run them from /var/lib/dpkg/info/ Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
14 lines
461 B
Bash
Executable File
14 lines
461 B
Bash
Executable File
#!/bin/sh
|
|
# RPM %preun — pre-uninstall scriptlet (spec §7).
|
|
set -eu
|
|
|
|
if [ "$1" -eq 0 ]; then
|
|
# Package is being erased — sanctioned disable (spec §7)
|
|
if [ -x /usr/libexec/fenris/fenris-monitor ]; then
|
|
/usr/libexec/fenris/fenris-monitor disable --now 2>/dev/null || true
|
|
fi
|
|
systemctl stop fenris-collect.timer 2>/dev/null || true
|
|
systemctl disable fenris-collect.timer 2>/dev/null || true
|
|
fi
|
|
# On upgrade ($1 -ge 1): do nothing
|