summaryrefslogtreecommitdiff
path: root/src/etc/ppp/ip-down.d/98-vyos-pppoe-cleanup-nameservers
blob: 222c75f214a7d47e69bb508006c9beddaaa8538b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
### Autogenerated by interfaces-pppoe.py ###

interface=$6
if [ -z "$interface" ]; then
    exit
fi

if ! /usr/bin/systemctl -q is-active vyos-hostsd; then
    exit  # vyos-hostsd is not running
fi

hostsd_client="/usr/bin/vyos-hostsd-client"
$hostsd_client --delete-name-servers --tag "dhcp-$interface"
$hostsd_client --apply