#!/bin/bash if [ "$EUID" != 0 ]; then echo "this script must be run as root" >&2 exit fi ip link del dev "${1-virbr0}" nft destroy table qemu if [ -f /tmp/restore-nft.conf ]; then nft -f /tmp/restore-nft.conf rm /tmp/restore-nft.conf fi kill -TERM "$(< /var/run/dnsmasq-virbr0.pid)" rm -f /var/run/dnsmasq-virbr0.pid