jpmens / homie-ota

OTA "server" in Python for Homie
127 stars 50 forks source link

Handling for SIGTERM #56

Closed kisse66 closed 7 years ago

kisse66 commented 7 years ago

Fix for #55: Currently the code does not handle SIGTERM. If code is run under e.g. systemd, the database is never synced to disk since systemd uses SIGTERM (default) to terminate a process. Not syncing means for instance that nodes deleted via GUI will re-appear when homie-ota is re-started. This adds a simple handler for SIGTERM, which makes the exit function work.

jpmens commented 7 years ago

Very good. Thank you. Merged.