Fix 1198 freshclam (#1199)

* Run freshclam as clamav user not root

* Remove freshclam cron job when clamav is disabled
This commit is contained in:
Erik Wramner 2019-07-29 11:15:49 +02:00 committed by Thomas VIAL
parent 70cbfa352b
commit f21bffe322
2 changed files with 2 additions and 2 deletions

View file

@ -97,7 +97,7 @@ RUN apt-get update -q --fix-missing && \
rm -f /etc/cron.weekly/fstrim && \
rm -f /etc/postsrsd.secret
RUN echo "0 0,6,12,18 * * * root /usr/bin/freshclam --quiet" > /etc/cron.d/clamav-freshclam && \
RUN echo "0 */6 * * * clamav /usr/bin/freshclam --quiet" > /etc/cron.d/clamav-freshclam && \
chmod 644 /etc/clamav/freshclam.conf && \
freshclam && \
sed -i 's/Foreground false/Foreground true/g' /etc/clamav/clamd.conf && \

View file

@ -1384,7 +1384,7 @@ function _fix_var_amavis_permissions() {
function _fix_cleanup_clamav() {
notify 'task' 'Cleaning up disabled Clamav'
rm -f /etc/logrotate.d/clamav-*
rm -f /etc/cron.d/freshclam
rm -f /etc/cron.d/clamav-freshclam
}
##########################################################################