[Unit] Description=I2C sensor reader and Prometheus push gateway exporter Documentation=https://caoimhe.io/projects/i2c-probe-prometheus.html After=network.target [Service] User=%i Type=simple EnvironmentFile=-/etc/default/i2c-probe-prometheus.%i ExecStart=/usr/bin/python3 /usr/local/i2c-probe-prometheus/export_datasets.py --aht10-i2c-bus=${AHT10_I2C_BUS} --aht10-i2c-addr=${AHT10_I2C_ADDR} --ccs811-i2c-bus=${CCS811_I2C_BUS} --ccs811-i2c-addr=${CCS811_I2C_ADDR} --wpa-supplicant-socket=${WPA_SUPPLICANT_SOCKET} --pushgateway-addr=${PROMETHEUS_PUSHGATEWAY_ADDR} --push-interval=${PUSH_INTERVAL} ${DEBUG} Restart=on-failure # Hardening ProtectSystem=full PrivateTmp=false SystemCallArchitectures=native MemoryDenyWriteExecute=true NoNewPrivileges=true [Install] WantedBy=multi-user.target