source: WAeUP_SysConf/logging/trunk/usr/local/sbin/updatedb_zevents.sh @ 4039

Last change on this file since 4039 was 2838, checked in by uli, 17 years ago

Switched to python based event log parser.

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#!/bin/sh
2##
3## updatedb_zevents.sh
4## Login : <uli@pu.smp.net>
5## Started on  Tue Dec 12 03:45:00 2006 Uli Fouquet
6## $Id$
7##
8## Copyright (C) 2006 Uli Fouquet
9## This program is free software; you can redistribute it and/or modify
10## it under the terms of the GNU General Public License as published by
11## the Free Software Foundation; either version 2 of the License, or
12## (at your option) any later version.
13##
14## This program is distributed in the hope that it will be useful,
15## but WITHOUT ANY WARRANTY; without even the implied warranty of
16## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17## GNU General Public License for more details.
18##
19## You should have received a copy of the GNU General Public License
20## along with this program; if not, write to the Free Software
21## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22##
23
24EVENT_LOG=event.test.log
25PYZEVENT=zevents.py
26
27## Read true values...
28if [ -f /etc/default/updatelogdb ]; then
29    . /etc/default/updatelogdb
30fi
31
32## There may be several names in EVENT_LOG...
33#if [ ! -r $EVENT_LOG ]; then
34#    echo "File not readable: $EVENT_LOG";
35#    exit -1;
36#fi
37
38if [ ! -r $PYZEVENT ]; then
39    echo "File not readable: $PYZEVENT";
40    exit -1;
41fi
42cat $EVENT_LOG | python $PYZEVENT | psql -h $HOST -d zevents -U $USER > /dev/null 2>&1
43
Note: See TracBrowser for help on using the repository browser.