summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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'])