psyciknz / CameraEvents

Dahua NVR/Camera Alerting to MQTT. Fairly specific to my needs, but also an attempt at starting to use travis.
Eclipse Public License 2.0
58 stars 19 forks source link

Can not find config file when executet from another directory #3

Open goermezer opened 5 years ago

goermezer commented 5 years ago

It seems, when executed from another directory, the script can not find the config file. I run it from crontab with absolute path to the script. At the moment I first have to change into the directory where CameraEvents.py is located and then I can start it.

Another finding is, that I can not stop the running script with CTRL+C. I have to kill it from the shell.

The script is quite useful. Thanks for creating it.

psyciknz commented 5 years ago

It looks for configs in filename = {"config.ini","conf/config.ini"}

If you wanted to you could update (or add) to the filename dictionary your location. If that's a bit painful, we could add the config filename as an execution argument.

I run in Docker, so it's not an issue for me I've come across