ids.alfacom.it/deployment/systemd/ids-syslog-parser.service
marco370 5b350ff95f Add Python dependency installation and virtual environment support
Introduce a new script to install Python dependencies in a virtual environment, update systemd services to utilize this environment, and modify the setup script to automate dependency checks and installation.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 7a657272-55ba-4a79-9a2e-f1ed9bc7a528
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: ea2a08f4-46e1-463d-9c58-16219914ad23
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/449cf7c4-c97a-45ae-8234-e5c5b8d6a84f/7a657272-55ba-4a79-9a2e-f1ed9bc7a528/n4Q2eeE
2025-11-22 09:40:57 +00:00

31 lines
676 B
Desktop File

[Unit]
Description=IDS Syslog Parser (Network Logs Processor)
After=network.target postgresql.service rsyslog.service
Requires=postgresql.service
[Service]
Type=simple
User=ids
Group=ids
WorkingDirectory=/opt/ids/python_ml
EnvironmentFile=/opt/ids/.env
# Comando esecuzione (usa virtual environment)
ExecStart=/opt/ids/python_ml/venv/bin/python3 syslog_parser.py
# Restart automatico in caso di crash
Restart=on-failure
RestartSec=10s
# Limiti risorse
LimitNOFILE=65536
MemoryMax=1G
# Logging
StandardOutput=append:/var/log/ids/syslog_parser.log
StandardError=append:/var/log/ids/syslog_parser.log
SyslogIdentifier=ids-syslog-parser
[Install]
WantedBy=multi-user.target