#!/bin/bash set -e # Build custom CoreDNS binary with RQLite plugin # This script compiles CoreDNS with the custom RQLite plugin COREDNS_VERSION="1.11.1" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_ROOT="$(dirname "$SCRIPT_DIR")" COREDNS_DIR="/tmp/coredns-build" echo "Building CoreDNS v${COREDNS_VERSION} with RQLite plugin..." # Clean previous build rm -rf "$COREDNS_DIR" mkdir -p "$COREDNS_DIR" # Clone CoreDNS echo "Cloning CoreDNS..." cd "$COREDNS_DIR" git clone --depth 1 --branch v${COREDNS_VERSION} https://github.com/coredns/coredns.git cd coredns # Create plugin.cfg with RQLite plugin echo "Configuring plugins..." cat > plugin.cfg <