ids.alfacom.it/deployment/systemd/ids-cleanup.service
marco370 791b7caa4d Add automatic cleanup for old detections and IP blocks
Implement automated detection cleanup after 48 hours and IP unblocking after 2 hours using systemd timers and Python scripts.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 7a657272-55ba-4a79-9a2e-f1ed9bc7a528
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 3809a8a0-8dd5-4b5a-9e32-9e075dab335e
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/449cf7c4-c97a-45ae-8234-e5c5b8d6a84f/7a657272-55ba-4a79-9a2e-f1ed9bc7a528/L6QSDnx
2025-11-25 10:40:44 +00:00

27 lines
550 B
Desktop File

[Unit]
Description=IDS Cleanup Detections Service
Documentation=https://github.com/yourusername/ids
After=network.target postgresql.service
[Service]
Type=oneshot
User=root
WorkingDirectory=/opt/ids
EnvironmentFile=/opt/ids/.env
ExecStart=/opt/ids/deployment/run_cleanup.sh
# Logging
StandardOutput=append:/var/log/ids/cleanup.log
StandardError=append:/var/log/ids/cleanup.log
# Security
NoNewPrivileges=true
PrivateTmp=true
# Restart policy (non necessario per oneshot)
# Restart=on-failure
# RestartSec=30
[Install]
WantedBy=multi-user.target