summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-11-18 11:27:49 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-11-18 11:27:49 +0100
commit66310b2fc46138f1dad61f4b1887a224badf2541 (patch)
tree906f371124686a80e1de1f2659f1261bfc732fec /pykolab
parent71df0cc7b4fc8373e6d84db8e8c01e56ca99ad25 (diff)
downloadpykolab-66310b2fc46138f1dad61f4b1887a224badf2541.tar.gz
Sigh, Debian. :/
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/setup/setup_roundcube.py4
-rw-r--r--pykolab/setup/setup_syncroton.py4
2 files changed, 8 insertions, 0 deletions
diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py
index 2b48b51..9b6d664 100644
--- a/pykolab/setup/setup_roundcube.py
+++ b/pykolab/setup/setup_roundcube.py
@@ -288,9 +288,13 @@ password='%s'
pass
httpservice = 'httpd.service'
+
if os.path.isfile('/usr/lib/systemd/system/apache2.service'):
httpservice = 'apache2.service'
+ if os.path.isdir('/lib/systemd/system/apache2.service.d'):
+ httpservice = 'apache2.service'
+
if os.path.isfile('/bin/systemctl'):
subprocess.call(['/bin/systemctl', 'restart', httpservice])
elif os.path.isfile('/sbin/service'):
diff --git a/pykolab/setup/setup_syncroton.py b/pykolab/setup/setup_syncroton.py
index 2f02d98..251c0e1 100644
--- a/pykolab/setup/setup_syncroton.py
+++ b/pykolab/setup/setup_syncroton.py
@@ -87,9 +87,13 @@ password='%s'
time.sleep(2)
httpservice = 'httpd.service'
+
if os.path.isfile('/usr/lib/systemd/system/apache2.service'):
httpservice = 'apache2.service'
+ if os.path.isdir('/lib/systemd/system/apache2.service.d'):
+ httpservice = 'apache2.service'
+
if os.path.isfile('/bin/systemctl'):
subprocess.call(['/bin/systemctl', 'restart', httpservice])
elif os.path.isfile('/sbin/service'):