Another fix for clamav

This commit is contained in:
VirtuBox
2019-08-31 12:47:35 +02:00
parent 972c6a5da0
commit 91fe49fd81

View File

@@ -1163,17 +1163,18 @@ def post_pref(self, apt_packages, packages, upgrade=False):
'redis', 'redis', recursive=False) 'redis', 'redis', recursive=False)
WOService.restart_service(self, 'redis-server') WOService.restart_service(self, 'redis-server')
# Redis configuration # ClamAV configuration
if set(["clamav"]).issubset(set(apt_packages)): if set(WOVariables.wo_clamav).issubset(set(apt_packages)):
Log.debug("Setting up freshclam cronjob") Log.debug("Setting up freshclam cronjob")
WOTemplate.render(self, '/opt/freshclam.sh', if not os.path.isfile("/opt/freshclam.sh"):
'freshclam.mustache', WOTemplate.render(self, '/opt/freshclam.sh',
data, overwrite=False) 'freshclam.mustache',
WOFileUtils.chmod(self, "/opt/freshclam.sh", 0o775) data, overwrite=False)
WOCron.setcron_weekly(self, '/opt/freshclam.sh ' WOFileUtils.chmod(self, "/opt/freshclam.sh", 0o775)
'> /dev/null 2>&1', WOCron.setcron_weekly(self, '/opt/freshclam.sh '
comment='ClamAV freshclam cronjob ' '> /dev/null 2>&1',
'added by WordOps') comment='ClamAV freshclam cronjob '
'added by WordOps')
if (packages): if (packages):
# WP-CLI # WP-CLI