#!/bin/bash
#
# pS-Performance Toolkit script that looks at the set of interfaces and
# determines the "external" address for the host.
#
# chkconfig: 2345 15 20
# description: pS-Performance Toolkit external address maintenance script
#

PREFIX=/opt/perfsonar_ps/toolkit
BINDIR=${PREFIX}/scripts

CMD="${BINDIR}/discover_external_address"

ERROR=0
ARGV="$@"
if [ "x$ARGV" = "x" ] ; then 
    ARGS="help"
fi

for ARG in $@ $ARGS
do
    case $ARG in
    start)
	echo $CMD

	$CMD
	;;
    stop)
	;;
    restart)
    	$0 start;
	;;
    *)
	echo "usage: $0 (start|stop|restart|help)"
	ERROR=2
    ;;

    esac

done

exit $ERROR
