Author: blues Date: Fri Feb 25 14:25:22 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- allow to make html reports and write them to file from cron-job
---- Files affected:
SOURCES:
logwatch.cron (NONE -> 1.1) (NEW), logwatch.sysconfig (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/logwatch.cron
diff -u /dev/null SOURCES/logwatch.cron:1.1
--- /dev/null Fri Feb 25 15:25:22 2005
+++ SOURCES/logwatch.cron Fri Feb 25 15:25:17 2005
@@ -0,0 +1,19 @@
+#!/bin/sh
+#########
+#---{ Initial values: }---#
+NICE_LEVEL="0"
+OUTPUT="unformated"
+DATA=`/bin/date +%x`
+
+#---{ Fetch configuration: }---#
+if [ -f /etc/sysconfig/logwatch ]; then
+ . /etc/sysconfig/logwatch
+fi
+
+#---{ main part }---#
+if [ "${OUTPUT_LOCATION}" ]; then
+ nice -n ${NICE_LEVEL} /usr/sbin/logwatch --output=${OUTPUT}
--save="${OUTPUT_LOCATION}/${DATA}.html"
+else
+ nice -n ${NICE_LEVEL} /usr/sbin/logwatch --output=${OUTPUT}
+fi
+
================================================================
Index: SOURCES/logwatch.sysconfig
diff -u /dev/null SOURCES/logwatch.sysconfig:1.1
--- /dev/null Fri Feb 25 15:25:22 2005
+++ SOURCES/logwatch.sysconfig Fri Feb 25 15:25:17 2005
@@ -0,0 +1,13 @@
+# Set priority when cleating report:
+NICE_LEVEL="0"
+
+# Select output.
+# - unformated - traditional text form (default)
+# - html - html output - if you try to mail it'll be encoded as uuencode
+# - html-embed - html embeded output - if you try to mail it'll be encoded as
mail-content
+# - mail - email with full headers
+OUTPUT="unformated"
+
+# Where to save file?
+# If commented - simply run logwatch
+#OUTPUT_LOCATION=/srv/logwatch/
================================================================
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit