summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJohannes Graumann <johannes_graumann@web.de>2012-10-15 22:20:06 +0300
committerPaul Klos <kolab@klos2day.nl>2012-10-24 06:35:18 -0400
commit6c297ab957fb166c4e6c67361de50f98cf6d7c20 (patch)
tree542efbc3d3033b9b7e02f75337794be694698c77 /pykolab
parentcfc34c5f7fca9b45220c99e0bd6983dc3ea353f3 (diff)
downloadpykolab-6c297ab957fb166c4e6c67361de50f98cf6d7c20.tar.gz
Debianize: Edit /etc/default/kolab-saslauthd to allow for init script mediated startup;
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/setup/setup_imap.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/pykolab/setup/setup_imap.py b/pykolab/setup/setup_imap.py
index 7ad9966..bd33a5b 100644
--- a/pykolab/setup/setup_imap.py
+++ b/pykolab/setup/setup_imap.py
@@ -17,6 +17,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
+from augeas import Augeas
from Cheetah.Template import Template
import os
import subprocess
@@ -129,6 +130,14 @@ def execute(*args, **kw):
fp.write("\n".join(annotations))
fp.close()
+ if os.path.isfile('/etc/default/kolab-saslauthd'):
+ myaugeas = Augeas()
+ setting = os.path.join('/files/etc/default/kolab-saslauthd','START')
+ if not myaugeas.get(setting) == 'yes':
+ myaugeas.set(setting,'yes')
+ myaugeas.save()
+ myaugeas.close()
+
if os.path.isfile('/bin/systemctl'):
subprocess.call(['systemctl', 'restart', 'cyrus-imapd.service'])
subprocess.call(['systemctl', 'restart', 'kolab-saslauthd.service'])