SOURCES: logwatch-cron.sh - nice with +

glen glen at pld-linux.org
Tue Oct 7 10:34:13 CEST 2008


Author: glen                         Date: Tue Oct  7 08:34:13 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- nice with +

---- Files affected:
SOURCES:
   logwatch-cron.sh (1.7 -> 1.8) 

---- Diffs:

================================================================
Index: SOURCES/logwatch-cron.sh
diff -u SOURCES/logwatch-cron.sh:1.7 SOURCES/logwatch-cron.sh:1.8
--- SOURCES/logwatch-cron.sh:1.7	Tue Oct  7 10:31:53 2008
+++ SOURCES/logwatch-cron.sh	Tue Oct  7 10:34:07 2008
@@ -1,5 +1,19 @@
-MAILTO=root
+#!/bin/sh
+#########
+#---{ Initial values: }---#
+SERVICE_RUN_NICE_LEVEL="+0"
+OUTPUT="unformated"
+DATE=$(/bin/date +%F)
 
-04 1 * * *  root    /usr/sbin/logwatch-cron
+#---{ Fetch configuration: }---#
+if [ -f /etc/sysconfig/logwatch ]; then
+	. /etc/sysconfig/logwatch
+fi
 
-# vim:syn=crontab
+#---{ main part }---#
+if [ "${OUTPUT_LOCATION}" ]; then
+	umask 022
+	nice -n ${SERVICE_RUN_NICE_LEVEL} /usr/sbin/logwatch --output=${OUTPUT} --save="${OUTPUT_LOCATION}/${DATE}.html"
+else
+	nice -n ${SERVICE_RUN_NICE_LEVEL} /usr/sbin/logwatch --output=${OUTPUT}
+fi
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/logwatch-cron.sh?r1=1.7&r2=1.8&f=u



More information about the pld-cvs-commit mailing list