summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJohannes Graumann <johannes_graumann@web.de>2012-10-15 22:36:41 +0300
committerJohannes Graumann <johannes_graumann@web.de>2012-10-15 22:36:41 +0300
commita2486764ecca3a6203d2ba6dfabeff66c95a9e58 (patch)
treef5730d2f65e300430b44ec14bafbbf16c8949c1a /pykolab
parenta01d23ee133c90565f7ef0a49f41970ccc7efa75 (diff)
downloadpykolab-a2486764ecca3a6203d2ba6dfabeff66c95a9e58.tar.gz
Debianize: Edit /etc/default/spamassassin to allow for init script mediated startup;
Diffstat (limited to 'pykolab')
-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 9c7c200..b841621 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'])