mirror of
https://github.com/imthenachoman/How-To-Secure-A-Linux-Server.git
synced 2025-12-06 01:02:49 +01:00
Update README.md
This commit is contained in:
@@ -2434,7 +2434,7 @@ logwatch's configuration file `/usr/share/logwatch/default.conf/logwatch.conf` s
|
||||
|
||||
``` bash
|
||||
sudo cp --archive /etc/cron.daily/00logwatch /etc/cron.daily/00logwatch-COPY-$(date +"%Y%m%d%H%M%S")
|
||||
sudo chmod -x /etc/cron.daily/00logwatch.*
|
||||
sudo chmod -x /etc/cron.daily/00logwatch-COPY*
|
||||
```
|
||||
|
||||
1. By default, logwatch outputs to `stdout`. Since the goal is to get a daily e-mail, we need to change the output type that logwatch uses to send e-mail instead. We could do this through the configuration file above, but that would apply to every time it is run -- even when we run it manually and want to see the output to the screen. Instead, we'll change the cron job that executes logwatch to send e-mail. This way, when run manually, we'll still get output to `stdout` and when run by cron, it'll send an e-mail. We'll also make sure it checks for all services, and change the output format to html so it's easier to read regardless of what the configuration file says. In the file `/etc/cron.daily/00logwatch` find the execute line and change it to:
|
||||
|
||||
Reference in New Issue
Block a user