5 PATH=/usr/bin:/bin:/usr/sbin:/sbin
7 if [ -d /var/athena ] && [ -w /var/athena ]; then
8 exec >/var/athena/moira_update.log 2>&1
10 exec >/tmp/moira_update.log 2>&1
13 # The following exit codes are defined and MUST BE CONSISTENT with the
14 # error codes the library uses:
15 MR_MISSINGFILE=47836473
19 OUTFILE=/var/tmp/ip-billing.out
20 OUTDIR=/var/tmp/ip-billing.dir
22 # Alert if the output file doesn't exist
23 test -r $OUTFILE || exit $MR_MISSINGFILE
25 # Make a temporary directory to unpack files into.
27 mkdir $OUTDIR || exit $MR_MKCRED
28 cd $OUTDIR || exit $MR_MKCRED
31 tar xpf $OUTFILE || exit $MR_TARERR
33 if [ ! -f moira.$i ]; then
42 test -f $OUTFILE && rm -f $OUTFILE
43 test -f $0 && rm -f $0