#!/usr/bin/env bash set -euo pipefail systemctl disable --now evobgp-firewall.timer 2>/dev/null || true rm -f /etc/cron.d/evobgp-firewall rm -f /etc/systemd/system/evobgp-firewall.service /etc/systemd/system/evobgp-firewall.timer systemctl daemon-reload 2>/dev/null || true nft delete table inet evobgp_blocklist 2>/dev/null || true ipset destroy evobgp_blocklist_v4 2>/dev/null || true iptables -D INPUT -m set --match-set evobgp_blocklist_v4 src -j DROP 2>/dev/null || true rm -f /usr/local/sbin/evobgp-firewall.sh /usr/local/sbin/evobgp-firewall-uninstall.sh rm -rf /var/lib/evobgp-firewall if [[ "${EVOBGP_UNINSTALL_REMOVE_CONF:-}" == "1" ]]; then rm -f /etc/evobgp/firewall.conf fi echo "evobgp-firewall uninstalled"