blob: 4f355713db1737dda575a8ee806a7a8f3a6b3319 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset='utf-8'>
<title>1. Logwatch</title>
</head>
<body>
<h1>1. Logwatch</h1>
<p>Get <a href="https://crux.nu/portdb/index.php?a=getup&q=deepthought">deepthought.httpup</a>
and move it to /etc/ports. Activate collection in /etc/prt-get.conf and run;</p>
<pre>
$ ports -u
$ prt-get depinst logwatch
</pre>
<h2 id="conf">1.1. Configure</h2>
<pre>
$ sudo cp /usr/share/logwatch/default.conf/logwatch.conf /etc/logwatch/conf/
</pre>
<p>Example configuration;</p>
<pre>
MailTo = admin@box
MailFrom = logwatch
Range = Today
Detail = Med
</pre>
<p>Activate all or per service;</p>
<pre>
#Service = All
Service = http
Service = exim
Service = dhcpd
</pre>
<pre>
$ sudo /usr/share/logwatch/scripts/logwatch.pl
</pre>
<h2 id="cron">1.2. Set cron task</h2>
<p>First make sure that email gets deliver;</p>
<pre>
$ sudo /usr/share/logwatch/scripts/logwatch.pl --output mail
</pre>
<p>Create file /etc/cron/daily/logwatch;</p>
<pre>
#!/bin/sh
#
# /etc/cron/daily/logwatch: run logwatch and mail output
#
/usr/share/logwatch/scripts/logwatch.pl --output mail
# End of file
</pre>
<pre>
$ sudo chmod +x /etc/cron/daily/logwatch
</pre>
</body>
</html>
|