OPNsense-NetFlow-export/systemdConfig/netflowCollector.service

27 lines
698 B
SYSTEMD
Raw Permalink Normal View History

2025-05-08 09:49:17 +02:00
[Unit]
Description=Netflow to InfluxDB script
After=multi-user.target network.target network-online.target
# Place in /etc/systemd/system/
[Service]
User=<CHANGE>
Group=<CHANGE>
2025-05-08 09:49:17 +02:00
Type=simple
Restart=on-failure
# EnvironmentFile=/etc/NetFlux/netflow.env
# User=myuser
WorkingDirectory=/dir/to/script/
ExecStart=/dir/to/script'sVENV/venv/bin/python3 /dir/to/script/NetFlowCollect.py --serve-in-foreground
2025-05-08 09:49:17 +02:00
#StandardInput=tty-force
# Log file will be create if it doesn't exist
StandardOutput=append:/var/log/NetFlowCollect.log
StandardError=append:/var/log/NetFlowCollect.errlog
2025-05-08 09:49:17 +02:00
# StandardOutput=syslog
# StandardError=syslog
# SyslogIdentifier=NetFlowInflux
[Install]
WantedBy=multi-user.target