- Update Dockerfile.package to build RPMs for multiple distributions using a unified fpm-based approach - Add RPM maintainer scripts (postinst, prerm, postrm) for proper installation and service management - Update ja4sentinel.spec for CentOS 7+ compatibility - Add packaging/systemd/config.yml as default configuration - Update test-rpm.sh to test installation on all 4 target distributions - Fix CentOS 7 repository configuration (EOL - vault.centos.org) Generated RPMs: - el7: CentOS 7 (libpcap >= 1.4.0) - el8: Rocky Linux 8 (libpcap >= 1.9.0) - el9: Rocky Linux 9 (libpcap >= 1.9.0) - el10: AlmaLinux 10 / Rocky Linux 10 (libpcap >= 1.9.0) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
22 lines
574 B
Bash
22 lines
574 B
Bash
#!/bin/bash
|
|
#
|
|
# prerm - Script de pré-désinstallation RPM pour ja4sentinel
|
|
# Compatible CentOS 7, Rocky Linux 8/9/10
|
|
#
|
|
|
|
set -e
|
|
|
|
echo "==> ja4sentinel: Running pre-removal script..."
|
|
|
|
# Stop and disable service before removal
|
|
if [ -x /bin/systemctl ]; then
|
|
echo "==> ja4sentinel: Stopping ja4sentinel.service..."
|
|
/bin/systemctl stop ja4sentinel.service >/dev/null 2>&1 || :
|
|
|
|
echo "==> ja4sentinel: Disabling ja4sentinel.service..."
|
|
/bin/systemctl disable ja4sentinel.service >/dev/null 2>&1 || :
|
|
fi
|
|
|
|
echo "==> ja4sentinel: Pre-removal complete."
|
|
exit 0
|