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:03:49 +0000
commit1c231bb23acdd74b496885cacf480fdde49f6ed9 (patch)
tree9e44d1add08b4a3dca71da04e1f86728d00a86e4
parent57baf32c8d473bcac464cac785cfd2b3e7c75cec (diff)
downloadpykolab-1c231bb23acdd74b496885cacf480fdde49f6ed9.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 5e420a2..4b7564f 100644
--- a/pykolab/setup/setup_imap.py
+++ b/pykolab/setup/setup_imap.py
@@ -141,26 +141,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 " + \