aboutsummaryrefslogtreecommitdiffstats
path: root/mqtt2pgsql.service
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2023-01-31 07:49:27 +0100
committerDennis Eriksen <d@ennis.no>2023-01-31 07:49:27 +0100
commit4b9958dd25bf67ec2a9fb6bbb9f1e2c7e9ee9321 (patch)
tree507d6854eb0ad5495aef90be89b53df4bf253991 /mqtt2pgsql.service
parentadding handler for tempsensors on mqtt (diff)
downloadenergyscripts-4b9958dd25bf67ec2a9fb6bbb9f1e2c7e9ee9321.tar.gz
handle HAN as well
Diffstat (limited to 'mqtt2pgsql.service')
-rw-r--r--mqtt2pgsql.service19
1 files changed, 19 insertions, 0 deletions
diff --git a/mqtt2pgsql.service b/mqtt2pgsql.service
new file mode 100644
index 0000000..d400b10
--- /dev/null
+++ b/mqtt2pgsql.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Simple service to start python-listener
+StartLimitIntervalSec=100
+StartLimitBurst=5
+
+[Service]
+Type=simple
+EnvironmentFile=%h/energyscripts/.env
+WorkingDirectory=%h/energyscripts
+ExecStart=%h/energyscripts/venv/bin/python3 -u mqtt2pgsql.py
+Restart=on-failure
+TimeoutStopSec=70
+RestartSec=30
+SyslogIdentifier=mqtt2pgsql
+#StandardOutput=journal
+#StandardError=journal
+
+[Install]
+WantedBy=default.target