X-Git-Url: https://iankelling.org/git/?p=newns;a=blobdiff_plain;f=newns;h=ad4c06c437c7b96d85232b41293ba48e19cb78d1;hp=e1f3944ba7318a16d13169edbc3c5986cc0598ae;hb=61d6fbfb34acb15c65fe71ef9f3c34592a272fa6;hpb=e5001f82b104366e8e7e8d77075aaad4a60d57b9 diff --git a/newns b/newns index e1f3944..ad4c06c 100755 --- a/newns +++ b/newns @@ -295,6 +295,12 @@ start() { mexec sed --follow-symlinks -i "s/nameserver 127\..*/nameserver $network.1/" /run/resolvconf/interface/lo.dnsmasq mexec resolvconf -u fi + # and in debian based distros at least, it runs with --local-service, and needs a restart + # to know about the new local network + if [[ $(systemctl --no-pager show -p ActiveState dnsmasq ) == ActiveState=active ]]; then + systemctl restart dnsmasq + fi + # background: if we did this in openvpn's resolv-conf script, we could guard it in # if capsh --print|grep '\bcap_sys_admin\b' &>/dev/null # and we could get $nn by