#! /bin/bash
exit

SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)

doSudo=""
if [ $(id -un) != "root" ]; then
    doSudo="/usr/bin/sudo"
fi

if [ -e /etc/NetworkManager/conf.d/00-use-dnsmasq.conf ]; then
    ${doSudo} rm -f /etc/NetworkManager/conf.d/00-use-dnsmasq.conf
fi

if [ -e /etc/NetworkManager/dnsmasq.d/01-testuite.conf ]; then
    ${doSudo} rm -f /etc/NetworkManager/dnsmasq.d/01-testuite.conf
fi

if [ -e /etc/NetworkManager/dnsmasq.d/02-add-hosts.conf ]; then
    ${doSudo} rm -f /etc/NetworkManager/dnsmasq.d/02-add-hosts.conf
fi

${doSudo} systemctl restart NetworkManager

