summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-07-27 11:23:34 +0200
committerroot <root@kolab.example.org>2012-07-27 11:24:15 +0200
commita413bf77e7b78ba93bd369f3439f5856350454b3 (patch)
treec7163610022ba58176090466b7ff6b92208f9ae9 /pykolab
parentb401410cf8237f131fbdab8fb6a800621e42740a (diff)
downloadpykolab-a413bf77e7b78ba93bd369f3439f5856350454b3.tar.gz
Add libkolab mysql.sql to initialization
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/setup/setup_roundcube.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py
index 88b7d24..8a720bf 100644
--- a/pykolab/setup/setup_roundcube.py
+++ b/pykolab/setup/setup_roundcube.py
@@ -151,6 +151,13 @@ def execute(*args, **kw):
if not schema_filepath in schema_files:
schema_files.append(schema_filepath)
+ for root, directories, filenames in os.walk('/usr/share/roundcubemail/plugins/libkolab/'):
+ for filename in filenames:
+ if filename.startswith('mysql') and filename.endswith('.sql'):
+ schema_filepath = os.path.join(root,filename)
+ if not schema_filepath in schema_files:
+ schema_files.append(schema_filepath)
+
p1 = subprocess.Popen(['echo', 'create database roundcube;'], stdout=subprocess.PIPE)
p2 = subprocess.Popen(['mysql', '--defaults-file=/tmp/kolab-setup-my.cnf'], stdin=p1.stdout)
p1.stdout.close()