'Install a `SIGTERM` + `SIGINT` handler saving the schedule.'

def install_sync_handler(self, service):

    def _sync(signum, frame):
        service.sync()
        raise SystemExit()
    platforms.signals.update(SIGTERM=_sync, SIGINT=_sync)
