#!/bin/sh
# $Header: /afs/sipb/project/mrtg/src/RCS/run-mrtg,v 1.6 2012/12/19 09:08:07 mitchb Exp $
# Run MRTG with tickets/tokens. Assumes we're in our own PAG.
#

KRBTKFILE=/tmp/tkt_mrtg.$$; export KRBTKFILE
KRB5CCNAME=/tmp/krb5cc_mrtg.$$; export KRB5CCNAME
KINIT=/usr/athena/bin/kinit
MRTG=/usr/local/mrtg-2/bin/mrtg
MRTGCFG=/afs/sipb.mit.edu/project/mrtg/config/mrtg.cfg

$KINIT -5 -k -t FILE:/usr/local/etc/krb5.keytab daemon/`hostname`
/bin/athena/aklog sipb.mit.edu
/usr/athena/bin/kdestroy

$MRTG $MRTGCFG 

/bin/athena/unlog
