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.
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.