1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
#!/bin/sh
ip=`ifconfig | grep -A10 en0 | grep "inet " | head -1 | awk '{ print $2; }'`
if [ "$ip" = "" ]
then
ip=`ifconfig | grep -A10 en1 | grep "inet " | head -1 | awk '{ print $2; }'`
fi
if [ "$ip" = "" ]
then
ip=`ifconfig | grep -A10 vnic0 | grep "inet " | head -1 | awk '{ print $2; }'`
fi
if [ "$ip" != "" ]
then
cat send.template | sed -e "s/IP/$ip/" > send.conf
env exabgp.tcp.bind="127.0.0.1" exabgp.tcp.port=1790 ../../../sbin/exabgp send.conf
else
echo "get some IP somewhere on this machine please"
fi
|