summaryrefslogtreecommitdiff
path: root/dynsrv.sh
blob: d0810d6c14ef5c9f0a3ecc38c2e2ce09f2d44cdb (plain)
1
2
3
4
5
6
7
8
9
#! /bin/sh
srv=`host -t srv _radsec._tcp.$1`
# should do exit 1 or something if host command fails
host=`echo $srv|cut -d\  -f8`
port=`echo $srv|cut -d\  -f7`
echo "server $1-$host {"
echo "    host $host"
echo "    port $port"
echo "}"