summaryrefslogtreecommitdiffstats
path: root/pykolab/setup/setup_kolabd.py
diff options
context:
space:
mode:
authorTimotheus Pokorra <tp@tbits.net>2015-05-05 11:06:17 +0200
committerTimotheus Pokorra <tp@tbits.net>2015-05-05 11:06:17 +0200
commit6359245b344eb81e1014fa5a2f51dd261db6b4e0 (patch)
tree5f9932ec235bd88e313ecb51ba37483e8d3cc043 /pykolab/setup/setup_kolabd.py
parent0c7325e65775e63ae79c11205220ab92b1c9342d (diff)
downloadpykolab-6359245b344eb81e1014fa5a2f51dd261db6b4e0.tar.gz
Debian Jessie: fix service names (#4688)
for systemd we need to use different service names for kolabd (kolab-server) and httpd (apache2) for CentOS vs Debian
Diffstat (limited to 'pykolab/setup/setup_kolabd.py')
-rw-r--r--pykolab/setup/setup_kolabd.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/pykolab/setup/setup_kolabd.py b/pykolab/setup/setup_kolabd.py
index 7c7982d..315c7a2 100644
--- a/pykolab/setup/setup_kolabd.py
+++ b/pykolab/setup/setup_kolabd.py
@@ -72,7 +72,10 @@ def execute(*args, **kw):
myaugeas.close()
if os.path.isfile('/bin/systemctl'):
- subprocess.call(['/bin/systemctl', 'restart', 'kolabd.service'])
+ if os.patch.isfile('/etc/debian_version'):
+ subprocess.call(['/bin/systemctl', 'restart', 'kolab-server.service'])
+ else:
+ subprocess.call(['/bin/systemctl', 'restart', 'kolabd.service'])
elif os.path.isfile('/sbin/service'):
subprocess.call(['/sbin/service', 'kolabd', 'restart'])
elif os.path.isfile('/usr/sbin/service'):
@@ -81,7 +84,10 @@ def execute(*args, **kw):
log.error(_("Could not start the kolab server service."))
if os.path.isfile('/bin/systemctl'):
- subprocess.call(['/bin/systemctl', 'enable', 'kolabd.service'])
+ if os.patch.isfile('/etc/debian_version'):
+ subprocess.call(['/bin/systemctl', 'enable', 'kolab-server.service'])
+ else:
+ subprocess.call(['/bin/systemctl', 'enable', 'kolabd.service'])
elif os.path.isfile('/sbin/chkconfig'):
subprocess.call(['/sbin/chkconfig', 'kolabd', 'on'])
elif os.path.isfile('/usr/sbin/update-rc.d'):