From: Calin Crisan Date: Sun, 29 Jun 2014 10:37:42 +0000 (+0300) Subject: motion is no longer started unless there's at least one camera X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=f8ea6c89595fda17c8b3fb8eeb791690687ff38c;p=motioneye-debian motion is no longer started unless there's at least one camera configured --- 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')