[rancid] Patch: Using logger instead of unattended logfiles
Christian Hammers
ch at westend.com
Mon May 22 10:21:06 UTC 2006
Hi
I like to get noticed in case of errors and don't like logfiles that
lay forgotten and unattended somewhere in a log/ directory so I piped
the output to logger which writes it to the syslog file which is
monitored by logcheck.
It would be nice if this would be configurable (or default).
bye,
-christian-
--- /home/ch/rancid-run 2006-05-22 11:27:47.419037711 +0200
+++ bin/rancid-run.in 2006-05-22 11:55:51.102623562 +0200
@@ -81,10 +81,6 @@
exit 1
fi
-if [ ! -d $LOGDIR ] ; then
- mkdir $LOGDIR || (echo "Could not create log directory: $LOGDIR"; exit 1)
-fi
-
for GROUP in $LIST_OF_GROUPS
do
@@ -131,5 +127,5 @@
echo
echo ending: `date`
- ) >$LOGDIR/$GROUP.`date +%Y%m%d.%H%M%S` 2>&1
+ ) 2>&1 | grep -v '^$' | logger -p daemon.info -t "rancid/$GROUP"
done
--
Christian Hammers WESTEND GmbH | Internet-Business-Provider
Technik CISCO Systems Partner - Authorized Reseller
Lütticher Straße 10 Tel 0241/701333-11
ch at westend.com D-52064 Aachen Fax 0241/911879
More information about the Rancid-discuss
mailing list