blob: ea4f933577449e9747e61d759e1dc22b1e7ebf55 (
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
73
74
75
76
77
78
79
80
|
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset='utf-8'>
<title>Logwatch</title>
</head>
<body>
<a href="index.html">Tools Index</a>
<h1>Logwatch</h1>
<p>Install logwatch, ports collection contains <a href="https://crux.nu/portdb/index.php?a=getup&q=deepthought">deepthought.httpup</a> port;</p>
<pre>
$ 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>
<a href="index.html">Tools Index</a>
<p>
This is part of the Hive System Documentation.
Copyright (C) 2019
Hive Team.
See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a> for copying conditions.</p>
</body>
</html>
|