mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
silence errorneous output when not generating reports (#1657)
* silence errorneous output when not generating reports * remove incorrect variable assignment * change error messages and logic when reports turned off * changing warn -> inf Co-authored-by: Charles Harris Co-authored-by: Georg Lauterbach
This commit is contained in:
parent
da8171388f
commit
451bbfdf40
|
@ -170,8 +170,8 @@ function register_functions
|
|||
_register_setup_function "_setup_environment"
|
||||
_register_setup_function "_setup_logrotate"
|
||||
|
||||
[[ ${PFLOGSUMM_TRIGGER} != "none" ]] && _register_setup_function "_setup_mail_summary"
|
||||
[[ ${LOGWATCH_TRIGGER} != "none" ]] && _register_setup_function "_setup_logwatch"
|
||||
_register_setup_function "_setup_mail_summary"
|
||||
_register_setup_function "_setup_logwatch"
|
||||
|
||||
_register_setup_function "_setup_user_patches"
|
||||
|
||||
|
@ -1725,6 +1725,7 @@ function _setup_mail_summary
|
|||
_notify 'inf' "Add postrotate action for pflogsumm report"
|
||||
sed -i "s|}| postrotate\n /usr/local/bin/postfix-summary ${HOSTNAME} ${PFLOGSUMM_RECIPIENT} ${PFLOGSUMM_SENDER}\n endscript\n}\n|" /etc/logrotate.d/maillog
|
||||
;;
|
||||
"none" ) _notify 'inf' "Postfix log summary reports disabled. You can enable them with 'PFLOGSUMM_TRIGGER=daily_cron' or 'PFLOGSUMM_TRIGGER=logrotate'" ;;
|
||||
* ) _notify 'err' 'PFLOGSUMM_TRIGGER not found in _setup_mail_summery' ;;
|
||||
esac
|
||||
}
|
||||
|
@ -1750,6 +1751,7 @@ function _setup_logwatch
|
|||
>> /etc/cron.weekly/logwatch
|
||||
chmod 744 /etc/cron.weekly/logwatch
|
||||
;;
|
||||
"none" ) _notify 'inf' "Logwatch reports disabled. You can enable them with 'LOGWATCH_INTERVAL=daily' or 'LOGWATCH_INTERVAL=weekly'" ;;
|
||||
* ) _notify 'warn' 'LOGWATCH_INTERVAL not found in _setup_logwatch' ;;
|
||||
esac
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue