]> andersk Git - moira.git/blame - gen/winstats.sh
Remove tarfile once we're done.
[moira.git] / gen / winstats.sh
CommitLineData
66462641 1#!/bin/sh
2
3dir=/var/ops/populate/stats
4tarfile=/var/tmp/winstats.out
5
6PATH="/etc:/bin:/usr/bin:/usr/etc:/usr/athena/etc"
7
8if [ -d /var/athena ] && [ -w /var/athena ]; then
9 exec >/var/athena/moira_update.log 2>&1
10else
11 exec >/tmp/moira_update.log 2>&1
12fi
13
14# The following exit codes are defined and MUST BE CONSISTENT with the
15# error codes the library uses:
16MR_MISSINGFILE=47836473
17MR_TARERR=47836476
18
19if [ ! -f $tarfile ]; then
20 exit $MR_MISSINGFILE
21fi
22
23cd $dir
24tar xf $tarfile
25
26if [ $? != 0 ]; then
27 exit $MR_TARERR;
28fi
29
30chmod 644 *
31
ad5bc412 32rm -f $tarfile
66462641 33rm -f $0
34exit 0
35
36
This page took 0.050905 seconds and 5 git commands to generate.