chore: remove unused files and code
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
- Delete obsolete RPM maintainer scripts (postinst, prerm, postrm) Scripts are now embedded in ja4sentinel.spec - Delete unused RPM test script (test-rpm.sh) Referenced non-existent el7 builds, not integrated in CI - Remove unused constants and functions from api/types.go: - DefaultInterface, DefaultPort, DefaultBPFFilter - DefaultFlowTimeout, DefaultPacketBuffer - LogLevelDebug, LogLevelInfo, LogLevelWarn, LogLevelError - DefaultConfig() function - Update Makefile with RPM_DIR variable for consistency Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@ -1,45 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# postinst - Script d'installation post-RPM pour ja4sentinel
|
||||
# Compatible CentOS 7, Rocky Linux 8/9/10
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
echo "==> ja4sentinel: Running post-installation script..."
|
||||
|
||||
# Set proper ownership
|
||||
chown -R ja4sentinel:ja4sentinel /var/lib/ja4sentinel 2>/dev/null || true
|
||||
chown -R ja4sentinel:ja4sentinel /var/run/ja4sentinel 2>/dev/null || true
|
||||
chown -R ja4sentinel:ja4sentinel /var/log/ja4sentinel 2>/dev/null || true
|
||||
chown -R ja4sentinel:ja4sentinel /etc/ja4sentinel 2>/dev/null || true
|
||||
|
||||
# Set proper permissions
|
||||
chmod 750 /var/lib/ja4sentinel 2>/dev/null || true
|
||||
chmod 750 /var/log/ja4sentinel 2>/dev/null || true
|
||||
chmod 750 /etc/ja4sentinel 2>/dev/null || true
|
||||
|
||||
# Install config if not exists
|
||||
if [ ! -f /etc/ja4sentinel/config.yml ]; then
|
||||
echo "==> ja4sentinel: Installing default configuration..."
|
||||
cp /usr/share/ja4sentinel/config.yml /etc/ja4sentinel/config.yml
|
||||
chown ja4sentinel:ja4sentinel /etc/ja4sentinel/config.yml 2>/dev/null || true
|
||||
chmod 640 /etc/ja4sentinel/config.yml
|
||||
fi
|
||||
|
||||
# Reload systemd and enable service (only if systemd is running)
|
||||
if [ -x /bin/systemctl ] && [ -d /run/systemd/system ]; then
|
||||
echo "==> ja4sentinel: Reloading systemd daemon..."
|
||||
/bin/systemctl daemon-reload
|
||||
|
||||
echo "==> ja4sentinel: Enabling ja4sentinel.service..."
|
||||
/bin/systemctl enable ja4sentinel.service 2>/dev/null || :
|
||||
|
||||
echo "==> ja4sentinel: Starting ja4sentinel.service..."
|
||||
/bin/systemctl start ja4sentinel.service 2>/dev/null || :
|
||||
else
|
||||
echo "==> ja4sentinel: systemd not detected (container environment), skipping service management..."
|
||||
fi
|
||||
|
||||
echo "==> ja4sentinel: Post-installation complete."
|
||||
exit 0
|
||||
@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# postrm - Script de post-désinstallation RPM pour ja4sentinel
|
||||
# Compatible CentOS 7, Rocky Linux 8/9/10
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
echo "==> ja4sentinel: Running post-removal script..."
|
||||
|
||||
# Reload systemd after removal
|
||||
if [ -x /bin/systemctl ]; then
|
||||
echo "==> ja4sentinel: Reloading systemd daemon..."
|
||||
/bin/systemctl daemon-reload
|
||||
fi
|
||||
|
||||
echo "==> ja4sentinel: Post-removal complete."
|
||||
exit 0
|
||||
@ -1,21 +0,0 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user