Projects
Kolab:3.4:Updates
pykolab
debian-jessie-systemd.patch
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File debian-jessie-systemd.patch of Package pykolab
From 6359245b344eb81e1014fa5a2f51dd261db6b4e0 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra <tp@tbits.net> Date: Tue, 5 May 2015 11:06:17 +0200 Subject: [PATCH 1/2] 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 --- pykolab/setup/setup_kolabd.py | 10 ++++++++-- pykolab/setup/setup_roundcube.py | 10 ++++++++-- pykolab/setup/setup_syncroton.py | 10 ++++++++-- 3 files changed, 24 insertions(+), 6 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.path.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.path.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'): diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py index 6558989..5baf3c5 100644 --- a/pykolab/setup/setup_roundcube.py +++ b/pykolab/setup/setup_roundcube.py @@ -227,7 +227,10 @@ password='%s' time.sleep(2) if os.path.isfile('/bin/systemctl'): - subprocess.call(['/bin/systemctl', 'restart', 'httpd.service']) + if os.path.isfile('/etc/debian_version'): + subprocess.call(['/bin/systemctl', 'restart', 'apache2.service']) + else: + subprocess.call(['/bin/systemctl', 'restart', 'httpd.service']) elif os.path.isfile('/sbin/service'): subprocess.call(['/sbin/service', 'httpd', 'restart']) elif os.path.isfile('/usr/sbin/service'): @@ -236,7 +239,10 @@ password='%s' log.error(_("Could not start the webserver server service.")) if os.path.isfile('/bin/systemctl'): - subprocess.call(['/bin/systemctl', 'enable', 'httpd.service']) + if os.path.isfile('/etc/debian_version'): + subprocess.call(['/bin/systemctl', 'enable', 'apache2.service']) + else: + subprocess.call(['/bin/systemctl', 'enable', 'httpd.service']) elif os.path.isfile('/sbin/chkconfig'): subprocess.call(['/sbin/chkconfig', 'httpd', 'on']) elif os.path.isfile('/usr/sbin/update-rc.d'): diff --git a/pykolab/setup/setup_syncroton.py b/pykolab/setup/setup_syncroton.py index ca99bd5..f98e046 100644 --- a/pykolab/setup/setup_syncroton.py +++ b/pykolab/setup/setup_syncroton.py @@ -87,7 +87,10 @@ password='%s' time.sleep(2) if os.path.isfile('/bin/systemctl'): - subprocess.call(['/bin/systemctl', 'restart', 'httpd.service']) + if os.path.isfile('/etc/debian_version'): + subprocess.call(['/bin/systemctl', 'restart', 'apache2.service']) + else: + subprocess.call(['/bin/systemctl', 'restart', 'httpd.service']) elif os.path.isfile('/sbin/service'): subprocess.call(['/sbin/service', 'httpd', 'restart']) elif os.path.isfile('/usr/sbin/service'): @@ -96,7 +99,10 @@ password='%s' log.error(_("Could not start the webserver server service.")) if os.path.isfile('/bin/systemctl'): - subprocess.call(['/bin/systemctl', 'enable', 'httpd.service']) + if os.path.isfile('/etc/debian_version'): + subprocess.call(['/bin/systemctl', 'enable', 'apache2.service']) + else: + subprocess.call(['/bin/systemctl', 'enable', 'httpd.service']) elif os.path.isfile('/sbin/chkconfig'): subprocess.call(['/sbin/chkconfig', 'httpd', 'on']) elif os.path.isfile('/usr/sbin/update-rc.d'): -- 1.9.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.