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 TARFILE=/var/tmp/stellar.out
20 SRCDIR=/var/tmp/stellar.dir
22 uchost=`hostname | tr '[a-z]' '[A-Z]'`
23 echo $uchost | egrep -e "\." >/dev/null
25 uchost=$uchost.MIT.EDU
28 # Alert if the tar file does not exist
29 test -r $TARFILE || exit $MR_MISSINGFILE
31 # Make a temporary directory to unpack the tar file into
33 mkdir $SRCDIR || exit $MR_MKCRED
34 cd $SRCDIR || exit $MR_MKCRED
37 tar xpf $TARFILE || exit $MR_TARERR
39 if [ -f "$uchost" ]; then
40 /var/local/stellar-support/moira-to-stellar.perl
48 test -f $TARFILE && rm -f $TARFILE
49 test -f $0 && rm -f $0