source: trunk/third/moira/gen/winstats.sh @ 24319

Revision 24319, 733 bytes checked in by broder, 14 years ago (diff)
New Moira snapshot from SVN.
Line 
1#!/bin/sh
2# $Id: winstats.sh 3956 2010-01-05 20:56:56Z zacheiss $
3
4dir=/var/ops/populate/stats
5tarfile=/var/tmp/winstats.out
6
7PATH="/etc:/bin:/usr/bin:/usr/etc:/usr/athena/etc"
8
9if [ -d /var/athena ] && [ -w /var/athena ]; then
10    exec >/var/athena/moira_update.log 2>&1
11else
12    exec >/tmp/moira_update.log 2>&1
13fi
14
15# The following exit codes are defined and MUST BE CONSISTENT with the
16# error codes the library uses:
17MR_MISSINGFILE=47836473
18MR_TARERR=47836476
19
20if [ ! -f $tarfile ]; then
21    exit $MR_MISSINGFILE
22fi
23
24cd $dir
25tar xf $tarfile
26
27if [ $? != 0 ]; then
28    exit $MR_TARERR;
29fi
30
31chmod 644 containers machine mcntmap
32
33# load the data.  This sends mail if it fails.
34$dir/winstats-load.pl
35
36rm -f $tarfile
37rm -f $0
38exit 0
39
40
Note: See TracBrowser for help on using the repository browser.