]> www.vanbest.org Git - motioneye-debian/commitdiff
smb mount point root is now configurable
authorCalin Crisan <ccrisan@gmail.com>
Wed, 25 Jun 2014 18:25:19 +0000 (21:25 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Wed, 25 Jun 2014 18:25:19 +0000 (21:25 +0300)
AUTHORS
settings_default.py
src/smbctl.py

diff --git a/AUTHORS b/AUTHORS
index e50709cf210e86247e70a84b0308e65388c4893e..be860ef41dc318997cb06de067cdbfc5fddf88ef 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -1 +1 @@
-motionEye was written by Calin Crisan <ccrisan@gmail.com>
+Calin Crisan <ccrisan@gmail.com>
index d90f6bb6ec7eb3174262f75a741834d25f8f04a7..ba108a68a23aa47ad3ab36b63747f4d9ada3e60c 100644 (file)
@@ -35,6 +35,9 @@ WPA_SUPPLICANT_CONF = None
 # enable SMB shares (requires root) 
 SMB_SHARES = False
 
+# the directory where the SMB mounts will be created
+SMB_MOUNT_ROOT = '/media'
+
 # interval in seconds at which motionEye checks the SMB mounts
 MOUNT_CHECK_INTERVAL = 300
 
index 061824f0eb1bf12c4e1325af8d0eefaf2e80d66e..86ef65093cd4bb8caca74e49d003d390c04f9ea8 100644 (file)
@@ -41,16 +41,17 @@ def make_mount_point(server, share, username):
     share = re.sub('[^a-zA-Z0-9]', '_', share).lower()
     
     if username:
-        mount_point = '/media/motioneye_%s_%s_%s' % (server, share, username) 
+        mount_point = os.path.join(settings.SMB_MOUNT_ROOT, 'motioneye_%s_%s_%s' % (server, share, username))
     
     else:
-        mount_point = '/media/motioneye_%s_%s' % (server, share)
+        mount_point = os.path.join(settings.SMB_MOUNT_ROOT, 'motioneye_%s_%s' % (server, share))
 
     return mount_point
 
 
 def _is_motioneye_mount(mount_point):
-    return bool(re.match('^/media/motioneye_\w+$', mount_point))
+    mount_point_root = os.path.join(settings.SMB_MOUNT_ROOT, 'motioneye_')
+    return bool(re.match('^' + mount_point_root + '\w+$', mount_point))
 
 
 def list_mounts():