From def27894ed011e667109fddf22f416a8bb43706f Mon Sep 17 00:00:00 2001 From: Petr Date: Sat, 13 May 2023 17:01:27 +0200 Subject: [PATCH] Add an example systemd service file --- wp2reg-luxws-exporter.service | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 wp2reg-luxws-exporter.service diff --git a/wp2reg-luxws-exporter.service b/wp2reg-luxws-exporter.service new file mode 100644 index 0000000..dcef4c5 --- /dev/null +++ b/wp2reg-luxws-exporter.service @@ -0,0 +1,27 @@ +; An example how to run `luxws-exporter` on systemd. +; Adapt at least `ExecStart` below to your environment and copy this file to +; /etc/systemd/system/. +[Unit] +Description=Prometheus exporter for working with heat pump controllers from Alpha Innotec and other manufacturers. https://github.com/hansmi/wp2reg-luxws +; Start after the network has been configured +After=network-online.target +Wants=network-online.target +StartLimitInterval=200 +StartLimitBurst=5 + +[Service] +Type=simple +; ===> Set the path and flags according to your environment. <================ +ExecStart=/usr/local/sbin/luxws-exporter --controller.address=192.168.0.1:8214 --controller.address.http=192.168.0.1:80 --controller.language=cz --web.listen-address=localhost:9101 +Restart=always +RestartSec=30 +; The fields below are optional, but strongly recommended: The service is put +; into an empty runtime directory chroot, i.e. the runtime directory which +; usually resides under /run. See also https://unix.stackexchange.com/q/635027/22339 +DynamicUser=yes +User=luxws-exporter +Group=luxws-exporter +RuntimeDirectory=luxws-exporter + +[Install] +WantedBy=multi-user.target