Handle failing rs_context_create().
[libradsec.git] / dynsrv.sh
1 #! /bin/sh
2 srv=`host -t srv _radsec._tcp.$1`
3 # should do exit 1 or something if host command fails
4 host=`echo $srv|cut -d\  -f8`
5 port=`echo $srv|cut -d\  -f7`
6 echo "server $1-$host {"
7 echo "    host $host"
8 echo "    port $port"
9 echo "}"