fixje / deflux

Write deCONZ sensor measurements to InfluxDB
MIT License
2 stars 2 forks source link

Add -config paramter #1

Closed jan666 closed 2 years ago

jan666 commented 2 years ago

It would be nice if I could specify the config file via -config parameter.

Would make it much easier to run it as cronjob (/home/deflux/go/bin/deflux -1 -config /home/deflux/deflux.yml)

...or start it as daemon via daemon -fr /home/deflux/go/bin/deflux -config /home/deflux/deflux.yml (on FreeBSD)

without writing to /etc/.

fixje commented 2 years ago

fixed in 94da49c9015cf355e1e461082797d5947f0a4e2f

Usage of ./deflux:
  -1    write sensor state from REST API once and exit
  -config string
        specify the location of the config file (default: ./deflux.yml or /etc/deflux.yml)
  -config-gen
        generate a default config and print it on stdout
  -loglevel string
        debug | error | warning | info (default "warning")