summaryrefslogtreecommitdiffstats
path: root/pykolab/setup/setup_kolabd.py
diff options
context:
space:
mode:
authorJohannes Graumann <johannes_graumann@web.de>2012-10-15 22:17:06 +0300
committerJohannes Graumann <johannes_graumann@web.de>2012-10-15 22:17:06 +0300
commit46a7fbf2a15f347c5fd1d579a5980d87d1906010 (patch)
tree5eeb392421d59ad637d37f7f8bd9630b4c45cebe /pykolab/setup/setup_kolabd.py
parent7370bc65561878edbab4be5ad3d6599eabdf3e3a (diff)
downloadpykolab-46a7fbf2a15f347c5fd1d579a5980d87d1906010.tar.gz
Debianize service restarts/init script updates;
Diffstat (limited to 'pykolab/setup/setup_kolabd.py')
-rw-r--r--pykolab/setup/setup_kolabd.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/pykolab/setup/setup_kolabd.py b/pykolab/setup/setup_kolabd.py
index 9e35a85..df05043 100644
--- a/pykolab/setup/setup_kolabd.py
+++ b/pykolab/setup/setup_kolabd.py
@@ -63,8 +63,20 @@ def execute(*args, **kw):
fp.close()
if os.path.isfile('/bin/systemctl'):
- subprocess.call(['systemctl', 'restart', 'kolabd.service'])
- subprocess.call(['systemctl', 'enable', 'kolabd.service'])
+ subprocess.call(['/bin/systemctl', 'restart', 'kolabd.service'])
elif os.path.isfile('/sbin/service'):
- subprocess.call(['service', 'kolabd', 'restart'])
- subprocess.call(['chkconfig', 'kolabd', 'on'])
+ subprocess.call(['/sbin/service', 'kolabd', 'restart'])
+ elif os.path.isfile('/usr/sbin/service'):
+ subprocess.call(['/usr/sbin/service','kolab-server','restart'])
+ else:
+ log.error(_("Could not start the kolab server service."))
+
+ if os.path.isfile('/bin/systemctl'):
+ 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'):
+ subprocess.call(['/usr/sbin/update-rc.d', 'kolab-server', 'defaults'])
+ else:
+ log.error(_("Could not configure to start on boot, the " + \
+ "kolab server service."))