paul@0 | 1 | Enable kolabd after configuration is complete. |
paul@0 | 2 | kolabd is disabled when installed. |
paul@0 | 3 | |
paul@0 | 4 | --- a/pykolab/setup/setup_kolabd.py |
paul@0 | 5 | +++ b/pykolab/setup/setup_kolabd.py |
paul@0 | 6 | @@ -27,6 +27,7 @@ |
paul@0 | 7 | from pykolab import utils |
paul@0 | 8 | from pykolab.constants import * |
paul@0 | 9 | from pykolab.translate import _ |
paul@0 | 10 | +from augeas import Augeas |
paul@0 | 11 | |
paul@0 | 12 | log = pykolab.getLogger('pykolab.setup') |
paul@0 | 13 | conf = pykolab.getConf() |
paul@0 | 14 | @@ -62,6 +63,14 @@ |
paul@0 | 15 | conf.cfg_parser.write(fp) |
paul@0 | 16 | fp.close() |
paul@0 | 17 | |
paul@0 | 18 | + if os.path.isfile('/etc/default/kolab-server'): |
paul@0 | 19 | + myaugeas = Augeas() |
paul@0 | 20 | + setting = os.path.join('/files/etc/default/kolab-server','START') |
paul@0 | 21 | + if not myaugeas.get(setting) == 'yes': |
paul@0 | 22 | + myaugeas.set(setting,'yes') |
paul@0 | 23 | + myaugeas.save() |
paul@0 | 24 | + myaugeas.close() |
paul@0 | 25 | + |
paul@0 | 26 | if os.path.isfile('/bin/systemctl'): |
paul@0 | 27 | subprocess.call(['/bin/systemctl', 'restart', 'kolabd.service']) |
paul@0 | 28 | elif os.path.isfile('/sbin/service'): |