1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-03 00:07:05 +00:00

setup: copy custom logwatch services and conf, if available

This commit is contained in:
downtownallday 2023-01-07 20:36:04 -05:00
parent eab4f80858
commit aaff2eebcf

View File

@ -27,7 +27,8 @@ logwatch_remove() {
logwatch_install() {
echo "Installing logwatch"
apt_install logwatch
# also install some perl modules used by our nextcloud logfilter
apt_install logwatch libjson-perl libtry-tiny-perl
# remove cron entry added by logwatch installer, which emails daily
rm -f /etc/cron.daily/00logwatch
mkdir -p /var/cache/logwatch
@ -50,6 +51,11 @@ logwatch_install() {
)
fi
# install our custom logwatch filters
if [ -d setup/mods.available/conf/logwatch ]; then
cp -R setup/mods.available/conf/logwatch/* /etc/logwatch/
fi
tools/editconf.py /etc/logwatch/conf/logwatch.conf -case-insensitive "${settings[@]}"
install_hook_handler "setup/mods.available/hooks/logwatch-hooks.py"
}