New MQTT adaption
This commit is contained in:
@ -1,16 +1,45 @@
|
||||
[Unit]
|
||||
Description=TTN Exporter for VEGAPULS Air
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
Description=TTN VEGAPULS Air Prometheus Exporter
|
||||
Documentation=https://git.mosad.xyz/localhorst/TTN-VEGAPULS-Air-exporter
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
RestartSec=2s
|
||||
Type=simple
|
||||
User=prometheus
|
||||
Group=prometheus
|
||||
|
||||
# Working directory
|
||||
WorkingDirectory=/opt/ttn-vegapulsair-exporter/
|
||||
|
||||
# Execution
|
||||
ExecStart=/usr/bin/python3 /opt/ttn-vegapulsair-exporter/ttn-vegapulsair-exporter.py
|
||||
|
||||
# Restart configuration
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
# Logging
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=ttn-vegapuls-exporter
|
||||
|
||||
# Security settings
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectSystem=strict
|
||||
ProtectHome=true
|
||||
ReadWritePaths=/opt/ttn-vegapulsair-exporter/
|
||||
ProtectKernelTunables=true
|
||||
ProtectKernelModules=true
|
||||
ProtectControlGroups=true
|
||||
|
||||
# Resource limits
|
||||
MemoryLimit=256M
|
||||
CPUQuota=5%
|
||||
|
||||
# Environment
|
||||
Environment="PYTHONUNBUFFERED=1"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user