summaryrefslogtreecommitdiffstats
path: root/pykolab/setup/setup_kolabd.py
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-07 01:03:08 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-07 01:03:08 +0100
commite0326b2e0d7b9fb88592baf7dc1991bd4d35a0e6 (patch)
tree56b9191c997f4c5a1549cb8921e494d37dc9f82d /pykolab/setup/setup_kolabd.py
parentb9eb14cf4f34a279d33c56464fb8688c75d36ace (diff)
downloadpykolab-e0326b2e0d7b9fb88592baf7dc1991bd4d35a0e6.tar.gz
Configure the kolabd service to start on boot (#725)
Diffstat (limited to 'pykolab/setup/setup_kolabd.py')
-rw-r--r--pykolab/setup/setup_kolabd.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pykolab/setup/setup_kolabd.py b/pykolab/setup/setup_kolabd.py
index 09a48ad..03c2cae 100644
--- a/pykolab/setup/setup_kolabd.py
+++ b/pykolab/setup/setup_kolabd.py
@@ -38,5 +38,9 @@ def description():
return _("Setup the Kolab daemon.")
def execute(*args, **kw):
- subprocess.call(['service', 'kolabd', 'start'])
- subprocess.call(['service', 'kolab-saslauthd', 'start'])
+ if os.path.isfile('/bin/systemctl'):
+ subprocess.call(['systemctl', 'restart', 'kolabd.service'])
+ subprocess.call(['systemctl', 'enable', 'kolabd.service'])
+ elif os.path.isfile('/sbin/service'):
+ subprocess.call(['service', 'kolabd', 'restart'])
+ subprocess.call(['chkconfig', 'kolabd', 'on'])