summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Graumann <johannes_graumann@web.de>2012-10-15 22:36:41 +0300
committerPaul Klos <kolab@klos2day.nl>2012-10-24 07:32:57 -0400
commit69de7c43102e07f0d8e7cb81668eea93e9860e48 (patch)
tree8fcf4a6c7bf0e9ac4ee0cd16f17db08953c6cad3
parentfd18fa9adb754db6178bda26e48ccea31375de2d (diff)
downloadpykolab-69de7c43102e07f0d8e7cb81668eea93e9860e48.tar.gz
Debianize: Edit /etc/default/spamassassin to allow for init script mediated startup;
(cherry picked from commit a2486764ecca3a6203d2ba6dfabeff66c95a9e58)
-rw-r--r--pykolab/setup/setup_mta.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index 6f0c102..fb3a2ad 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -312,6 +312,14 @@ result_attribute = mail
f.writelines(conf.get('kolab', 'primary_domain'))
f.close()
+ if os.path.isfile('/etc/default/spamassassin'):
+ myaugeas = Augeas()
+ setting = os.path.join('/files/etc/default/spamassassin','ENABLED')
+ if not myaugeas.get(setting) == '1':
+ myaugeas.set(setting,'1')
+ myaugeas.save()
+ myaugeas.close()
+
if os.path.isfile('/bin/systemctl'):
subprocess.call(['systemctl', 'restart', 'postfix.service'])
subprocess.call(['systemctl', 'restart', 'amavisd.service'])