pykolab/setup

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Tue Aug 19 13:25:35 CEST 2014


 pykolab/setup/setup_kolabd.py |    9 +++++++++
 pykolab/setup/setup_mta.py    |    8 ++++++++
 2 files changed, 17 insertions(+)

New commits:
commit ef398699e6a041e718dfec2d67702edd45135e64
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Tue Aug 19 13:22:55 2014 +0200

    Drop patches from packaging (#3374)

diff --git a/pykolab/setup/setup_kolabd.py b/pykolab/setup/setup_kolabd.py
index 8b8c50e..7c7982d 100644
--- a/pykolab/setup/setup_kolabd.py
+++ b/pykolab/setup/setup_kolabd.py
@@ -27,6 +27,7 @@ import pykolab
 from pykolab import utils
 from pykolab.constants import *
 from pykolab.translate import _
+from augeas import Augeas
 
 log = pykolab.getLogger('pykolab.setup')
 conf = pykolab.getConf()
@@ -62,6 +63,14 @@ def execute(*args, **kw):
             conf.cfg_parser.write(fp)
             fp.close()
 
+    if os.path.isfile('/etc/default/kolab-server'):
+        myaugeas = Augeas()
+        setting = os.path.join('/files/etc/default/kolab-server','START')
+        if not myaugeas.get(setting) == 'yes':
+            myaugeas.set(setting,'yes')
+            myaugeas.save()
+        myaugeas.close()
+
     if os.path.isfile('/bin/systemctl'):
         subprocess.call(['/bin/systemctl', 'restart', 'kolabd.service'])
     elif os.path.isfile('/sbin/service'):
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index c3ab0e3..7898599 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -420,6 +420,14 @@ result_format = shared+%%s
             myaugeas.save()
         myaugeas.close()
 
+    if os.path.isfile('/etc/default/wallace'):
+        myaugeas = Augeas()
+        setting = os.path.join('/files/etc/default/wallace','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', 'postfix.service'])
         subprocess.call(['systemctl', 'restart', 'amavisd.service'])




More information about the commits mailing list