diff options
Diffstat (limited to 'mqtt_listener.service')
-rw-r--r-- | mqtt_listener.service | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mqtt_listener.service b/mqtt_listener.service new file mode 100644 index 0000000..1ae79ca --- /dev/null +++ b/mqtt_listener.service @@ -0,0 +1,17 @@ +[Unit] +Description=Simple service to start mqtt-listener +StartLimitIntervalSec=100 +StartLimitBurst=5 + +[Service] +Type=simple +EnvironmentFile=%h/energyscripts/.env +WorkingDirectory=%h/energyscripts +ExecStart=%h/energyscripts/venv/bin/python3 -u scripts/mqtt_listener.py +Restart=on-failure +TimeoutStopSec=70 +RestartSec=30 +SyslogIdentifier=%N + +[Install] +WantedBy=default.target |