File: second

package info (click to toggle)
exabgp 4.2.25-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,612 kB
  • sloc: python: 37,482; sh: 581; perl: 31; makefile: 23
file content (18 lines) | stat: -rwxr-xr-x 523 bytes parent folder | download | duplicates (8)
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 second.template | sed -e "s/IP/$ip/" > second.conf
	env exabgp.tcp.bind="$ip" exabgp.tcp.port=1790 ../../../sbin/exabgp second.conf $*
else
	echo "get some IP somewhere on this machine please"
fi