xperimental / netatmo-exporter

Prometheus exporter for Netatmo sensor data.
MIT License
44 stars 18 forks source link

Guidance on setting up a linux service #51

Closed sbrooke closed 1 year ago

sbrooke commented 1 year ago

Moving my service issue over here.

I don't have a good grasp on setting up services. This was a copy and paste from another one that works well for me. I'll do some research to learn myself on how to do it properly, but any guidance would also be appreciated.

sbrooke commented 1 year ago

Changing it to simple from forking may have fixed it. I'll report back after a day.

sbrooke commented 1 year ago

Looks like that did the trick. 12 hours later and it's still working.

xperimental commented 1 year ago

@sbrooke Don't know if this is still useful for you, but I've started creating the example configurations in the example-config branch.

There's a service unit file and make install to create all the necessary files at the paths I have picked for a default. It's also expecting a user called netatmo-exporter that has to be created before, for example using:

useradd -r -U -M -d /var/lib/netatmo-exporter -c 'NetAtmo Prometheus exporter' netatmo-exporter