Merge pull request #1222 from erik-wramner/no_sa_cron_when_sa_disabled

Remove spamassassin cron job when spamassassin is off
This commit is contained in:
Erik Wramner 2019-08-11 10:18:07 +02:00 committed by GitHub
commit a0ee229f00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -176,7 +176,10 @@ 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"
_register_fix_function "_fix_cleanup_clamav"
fi
if [ "$ENABLE_SPAMASSASSIN" = 0 ]; then
_register_fix_function "_fix_cleanup_spamassassin"
fi
################### << fix funcs
@ -1430,6 +1433,11 @@ function _fix_cleanup_clamav() {
rm -f /etc/cron.d/clamav-freshclam
}
function _fix_cleanup_spamassassin() {
notify 'task' 'Cleaning up disabled spamassassin'
rm -f /etc/cron.daily/spamassassin
}
##########################################################################
# << Fix Stack
##########################################################################