Disable logrotate and cron job for updating clamav if clamav is disabled (fixes #660) (#667)

This commit is contained in:
Daniel Panteleit 2017-07-23 21:31:41 +02:00 committed by Thomas VIAL
parent b92e2c52c5
commit 60afbe1d16
3 changed files with 11 additions and 3 deletions

View file

@ -129,6 +129,9 @@ function register_functions() {
_register_fix_function "_fix_var_mail_permissions"
_register_fix_function "_fix_var_amavis_permissions"
if [ "$ENABLE_CLAMAV" = 0 ]; then
_register_fix_function "_fix_cleanup_clamav"
fi
################### << fix funcs
@ -1050,6 +1053,12 @@ function _fix_var_amavis_permissions() {
fi
}
function _fix_cleanup_clamav() {
notify 'task' 'Cleaning up disabled Clamav'
rm -f /etc/logrotate.d/clamav-*
rm -f /etc/cron.d/freshclam
}
##########################################################################
# << Fix Stack
##########################################################################