File tree 1 file changed +25
-0
lines changed
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,31 @@ maxretry = 3
172
172
echo
173
173
echo
174
174
echo
175
+ echo " Installing and configuring logwatch for log monitoring"
176
+ # https://help.ubuntu.com/community/Logwatch
177
+ echo " --------------------------------------------------------------"
178
+ #
179
+ aptitude -y install logwatch
180
+ mkdir /var/cache/logwatch
181
+ cp /usr/share/logwatch/default.conf/logwatch.conf /etc/logwatch/conf/
182
+ #
183
+ sed -i " s/MailTo = root/MailTo = $ADMINEMAIL /g" /etc/logwatch/conf/logwatch.conf
184
+ sed -i " s/Detail = Low/Detail = High/g" /etc/logwatch/conf/logwatch.conf
185
+ sed -i " s/Format = text/Format = html/g" /etc/logwatch/conf/logwatch.conf
186
+ #
187
+ cp /usr/share/logwatch/default.conf/logfiles/http.conf to /etc/logwatch/conf/logfiles
188
+ #
189
+ echo "
190
+ # Log files for $DOMAIN
191
+ LogFile = /home/$USER /public_html/$DOMAIN /log/access.log
192
+ LogFile = /home/$USER /public_html/$DOMAIN /log/error.log
193
+ LogFile = /home/$USER /public_html/$DOMAIN /log/ssl_error.log
194
+ LogFile = /home/$USER /public_html/$DOMAIN /log/ssl_access.log
195
+ " >> /etc/logwatch/conf/logfiles/http.conf
196
+ #
197
+ echo
198
+ echo
199
+ echo
175
200
echo " Enabling site $DOMAIN , restarting apache"
176
201
echo " --------------------------------------------------------------"
177
202
#
You can’t perform that action at this time.
0 commit comments