]> www.vanbest.org Git - motioneye-debian/commitdiff
motion is no longer started unless there's at least one camera
authorCalin Crisan <ccrisan@gmail.com>
Sun, 29 Jun 2014 10:37:42 +0000 (13:37 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sun, 29 Jun 2014 10:37:42 +0000 (13:37 +0300)
configured

motioneye.py
src/handlers.py
src/motionctl.py

index ed6032f99a5a252de634f59894248599d0315890..def4a642b41420c52475cabfb19be79b141f35bf 100755 (executable)
@@ -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)
 
index e29c8b627c80fa1008df428699f42f95f48c276a..610403c6ea301947a549f09de1fbf875784e0328 100644 (file)
@@ -545,8 +545,7 @@ class ConfigHandler(BaseHandler):
         
         if local:
             motionctl.stop()
-            if config.has_enabled_cameras():
-                motionctl.start()
+            motionctl.start()
             
         self.finish_json()
 
index 176a76ba7927cf74583fce1110ee6b9439e6e6e7..16a3def74d0a8a36dff771965603de5ced9aa3a2 100644 (file)
@@ -54,7 +54,7 @@ def start():
     
     _started = True
     
-    if running():
+    if running() or not config.has_enabled_cameras():
         return
     
     logging.debug('starting motion')