summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pykolab/setup/setup_mta.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index f2883a7..d7f070c 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -442,6 +442,20 @@ result_format = "shared+%%s"
myaugeas.save()
myaugeas.close()
+ if os.path.isfile('/usr/lib/systemd/system/clamd@.service'):
+ from ConfigParser import SafeConfigParser
+ unitfile = SafeConfigParser()
+ unitfile.optionxform = str
+ unitfile.read('/usr/lib/systemd/system/clamd@.service')
+ if not unitfile.has_section('Install'):
+ unitfile.add_section('Install')
+
+ if not unitfile.has_option('Install', 'WantedBy'):
+ unitfile.set('Install', 'WantedBy', 'multi-user.target')
+
+ with open('/etc/systemd/system/clamd@.service', 'wb') as f:
+ unitfile.write(f)
+
amavisservice = 'amavisd.service'
clamavservice = 'clamd@amavisd.service'
if os.path.isfile('/usr/lib/systemd/system/amavis.service'):