Reorder, categorise and clean up. Also now there

is a somewhat usefull readme.
This commit is contained in:
YuruC3
2025-05-09 22:12:19 +02:00
parent 262c297350
commit ef535fa2df
33 changed files with 55 additions and 902 deletions

8
systemdConfig/README.md Normal file
View File

@@ -0,0 +1,8 @@
# What you need to prepare
virtual enviroment in python with installed packages
python script and InfluxDB
## Change stuff
In .service file change everything that has <SOMETHIN_LIKE_THIS> and /path/to/dir

View File

@@ -0,0 +1,27 @@
[Unit]
Description=Netflow to InfluxDB script
After=multi-user.target network.target network-online.target
# Place in /etc/systemd/system/
[Service]
User=yuru
Group=yuru
Type=simple
Restart=on-failure
# EnvironmentFile=/etc/NetFlux/netflow.env
# User=myuser
WorkingDirectory=/etc/NetFlux/HQ/
ExecStart=/etc/NetFlux/HQ/venv/bin/python3 /etc/NetFlux/HQ/HQnetflow.py --serve-in-foreground
#StandardInput=tty-force
# Log file will be create if it doesn't exist
StandardOutput=append:/var/log/HQNetFlowInflux.log
StandardError=append:/var/log/HQNetFlowInflux.errlog
# StandardOutput=syslog
# StandardError=syslog
# SyslogIdentifier=NetFlowInflux
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,26 @@
[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>
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
#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
# StandardOutput=syslog
# StandardError=syslog
# SyslogIdentifier=NetFlowInflux
[Install]
WantedBy=multi-user.target