]> www.vanbest.org Git - motioneye-debian/commitdiff
added LOG_PATH setting
authorCalin Crisan <ccrisan@gmail.com>
Wed, 24 Sep 2014 14:38:15 +0000 (17:38 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Wed, 24 Sep 2014 14:38:15 +0000 (17:38 +0300)
motioneye.py
settings_default.py
src/motionctl.py

index fcf61a8cc664d55921c68b344ded6148dfeb75e6..3fed3df686f7c591a6933348ab17299570ec7545 100755 (executable)
@@ -43,6 +43,7 @@ def _configure_settings():
     set_default_setting('STATIC_URL', '/static/')
     set_default_setting('CONF_PATH', os.path.join(settings.PROJECT_PATH, 'conf'))
     set_default_setting('RUN_PATH', os.path.join(settings.PROJECT_PATH, 'run'))
+    set_default_setting('LOG_PATH', os.path.join(settings.PROJECT_PATH, 'log'))
     set_default_setting('MEDIA_PATH', os.path.join(settings.PROJECT_PATH, 'media'))
     set_default_setting('REPO', ('ccrisan', 'motioneye'))
     set_default_setting('LOG_LEVEL', logging.INFO)
@@ -128,6 +129,12 @@ def _configure_settings():
     except:
         pass
 
+    try:
+        os.makedirs(settings.LOG_PATH)
+
+    except:
+        pass
+
     try:
         os.makedirs(settings.MEDIA_PATH)
 
index c2d34fd8c555a681d06e572defd5761d33d0c2e1..294420f73eec5322875740c4c16c02bae0dae82e 100644 (file)
@@ -14,9 +14,12 @@ STATIC_URL = '/static/'
 # path to the config directory; must be writable
 CONF_PATH = os.path.abspath(os.path.join(PROJECT_PATH, 'conf'))
 
-# log and pid files go here
+# pid files go here
 RUN_PATH = os.path.abspath(os.path.join(PROJECT_PATH, 'run'))
 
+# log files go here
+LOG_PATH = os.path.abspath(os.path.join(PROJECT_PATH, 'log'))
+
 # default output path for media files
 MEDIA_PATH = os.path.abspath(os.path.join(PROJECT_PATH, 'media'))
 
index c738ce58355c9d71c401d7dab3213ae0c269bda6..e3e6734a0d30d12e4b5eccb5d348479766c73910 100644 (file)
@@ -86,7 +86,7 @@ def start():
     program, version = program  # @UnusedVariable
     
     motion_config_path = os.path.join(settings.CONF_PATH, 'motion.conf')
-    motion_log_path = os.path.join(settings.RUN_PATH, 'motion.log')
+    motion_log_path = os.path.join(settings.LOG_PATH, 'motion.log')
     motion_pid_path = os.path.join(settings.RUN_PATH, 'motion.pid')
     
     args = [program,