From f8ea6c89595fda17c8b3fb8eeb791690687ff38c Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 29 Jun 2014 13:37:42 +0300 Subject: [PATCH] motion is no longer started unless there's at least one camera configured --- motioneye.py | 3 +-- src/handlers.py | 3 +-- src/motionctl.py | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/motioneye.py b/motioneye.py index ed6032f..def4a64 100755 --- a/motioneye.py +++ b/motioneye.py @@ -297,8 +297,7 @@ def _start_motion(): ioloop.add_timeout(datetime.timedelta(seconds=settings.MOTION_CHECK_INTERVAL), checker) - if config.has_enabled_cameras(): - motionctl.start() + motionctl.start() ioloop.add_timeout(datetime.timedelta(seconds=settings.MOTION_CHECK_INTERVAL), checker) diff --git a/src/handlers.py b/src/handlers.py index e29c8b6..610403c 100644 --- a/src/handlers.py +++ b/src/handlers.py @@ -545,8 +545,7 @@ class ConfigHandler(BaseHandler): if local: motionctl.stop() - if config.has_enabled_cameras(): - motionctl.start() + motionctl.start() self.finish_json() diff --git a/src/motionctl.py b/src/motionctl.py index 176a76b..16a3def 100644 --- a/src/motionctl.py +++ b/src/motionctl.py @@ -54,7 +54,7 @@ def start(): _started = True - if running(): + if running() or not config.has_enabled_cameras(): return logging.debug('starting motion') -- 2.39.5