summaryrefslogtreecommitdiffstats
path: root/pykolab/setup/setup_kolabd.py
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-04-24 15:46:42 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-04-24 15:46:42 +0200
commit4054fb9435ec9e95f89d90e3794caed251071ab7 (patch)
tree2233ed8770701636abac09b6eaa818fbdf94a797 /pykolab/setup/setup_kolabd.py
parent06ceb84a63d38cc2ab238c8a24efeb8c66f2a57b (diff)
downloadpykolab-4054fb9435ec9e95f89d90e3794caed251071ab7.tar.gz
Add kolabd and mysql setup
Diffstat (limited to 'pykolab/setup/setup_kolabd.py')
-rw-r--r--pykolab/setup/setup_kolabd.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/pykolab/setup/setup_kolabd.py b/pykolab/setup/setup_kolabd.py
new file mode 100644
index 0000000..09a48ad
--- /dev/null
+++ b/pykolab/setup/setup_kolabd.py
@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+# Copyright 2010-2012 Kolab Systems AG (http://www.kolabsys.com)
+#
+# Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 3 or, at your option, any later version
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+
+import os
+import subprocess
+
+import components
+
+import pykolab
+
+from pykolab import utils
+from pykolab.constants import *
+from pykolab.translate import _
+
+log = pykolab.getLogger('pykolab.setup')
+conf = pykolab.getConf()
+
+def __init__():
+ components.register('kolabd', execute, description=description(), after=['ldap','imap'])
+
+def description():
+ return _("Setup the Kolab daemon.")
+
+def execute(*args, **kw):
+ subprocess.call(['service', 'kolabd', 'start'])
+ subprocess.call(['service', 'kolab-saslauthd', 'start'])