Skip to content

Commit

Permalink
Add an example systemd service file
Browse files Browse the repository at this point in the history
  • Loading branch information
ppetr authored and hansmi committed May 24, 2023
1 parent 6c322f5 commit def2789
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions wp2reg-luxws-exporter.service
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit def2789

Please sign in to comment.