summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-11-25 14:03:49 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-11-25 14:04:15 +0000
commit8dd1e8a6be67f95338e7b9dcf752bdb9a349fdc8 (patch)
treea26ad8f8e46c2670d6759a8fa3b2d285af5f7bac
parent1ea303d92a99011ad67552769c479134c3e66e67 (diff)
downloadpykolab-8dd1e8a6be67f95338e7b9dcf752bdb9a349fdc8.tar.gz
Disable and shut down saslauthd before starting kolab-saslauthd
-rw-r--r--pykolab/setup/setup_imap.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pykolab/setup/setup_imap.py b/pykolab/setup/setup_imap.py
index 9862320..cfec269 100644
--- a/pykolab/setup/setup_imap.py
+++ b/pykolab/setup/setup_imap.py
@@ -139,26 +139,31 @@ def execute(*args, **kw):
myaugeas.close()
if os.path.isfile('/bin/systemctl'):
+ subprocess.call(['systemctl', 'stop', 'saslauthd.service'])
subprocess.call(['systemctl', 'restart', 'kolab-saslauthd.service'])
subprocess.call(['systemctl', 'restart', 'cyrus-imapd.service'])
elif os.path.isfile('/sbin/service'):
+ subprocess.call(['service', 'saslauthd', 'stop'])
subprocess.call(['service', 'kolab-saslauthd', 'restart'])
subprocess.call(['service', 'cyrus-imapd', 'restart'])
elif os.path.isfile('/usr/sbin/service'):
+ subprocess.call(['/usr/sbin/service','saslauthd','stop'])
subprocess.call(['/usr/sbin/service','kolab-saslauthd','restart'])
subprocess.call(['/usr/sbin/service','cyrus-imapd','restart'])
else:
log.error(_("Could not start the cyrus-imapd and kolab-saslauthd services."))
if os.path.isfile('/bin/systemctl'):
+ subprocess.call(['systemctl', 'disable', 'saslauthd.service'])
subprocess.call(['systemctl', 'enable', 'kolab-saslauthd.service'])
subprocess.call(['systemctl', 'enable', 'cyrus-imapd.service'])
elif os.path.isfile('/sbin/chkconfig'):
+ subprocess.call(['chkconfig', 'saslauthd', 'off'])
subprocess.call(['chkconfig', 'kolab-saslauthd', 'on'])
subprocess.call(['chkconfig', 'cyrus-imapd', 'on'])
elif os.path.isfile('/usr/sbin/update-rc.d'):
- subprocess.call(['/usr/sbin/update-rc.d', 'kolab-saslauthd', 'defaults'])
subprocess.call(['/usr/sbin/update-rc.d', 'saslauthd', 'disable'])
+ subprocess.call(['/usr/sbin/update-rc.d', 'kolab-saslauthd', 'defaults'])
subprocess.call(['/usr/sbin/update-rc.d', 'cyrus-imapd', 'defaults'])
else:
log.error(_("Could not configure to start on boot, the " + \