dynsrv.sh 237 Bytes
Newer Older
venaas's avatar
venaas committed
1
#! /bin/sh
2
srv=`host -t srv _radsec._tcp.$1`
venaas's avatar
venaas committed
3
# should do exit 1 or something if host command fails
4 5
host=`echo $srv|cut -d\  -f8`
port=`echo $srv|cut -d\  -f7`
6 7
echo "server $1-$host {"
echo "    host $host"
8
echo "    port $port"
9
echo "}"