Skip to content
Snippets Groups Projects
5.1-setting-dns-server.sh 852 B
Newer Older
aticig's avatar
aticig committed
#!/bin/bash

VNF_ID=`osm vnf-list --ns $PDNS_NS_NAME | grep powerdns | awk '{print $2}'`

echo "========================================================================"
echo "VNF ID $VNF_ID"
echo "========================================================================"

export DNS_IP=`osm vnf-show $VNF_ID --literal | yq -e '.kdur[0].services[] | select(.name | contains("udp")) | .external_ip' | tr -d ' '-`

echo "========================================================================"
echo "DNS IP $DNS_IP"
echo "========================================================================"

echo "========================================================================"
echo "Setting DNS Server in your machine"
echo "========================================================================"
echo "nameserver ${DNS_IP}" | tee -a  /etc/resolv.conf