Files
random/flushdns
T
Nick Trochalakis 60f8bafead Update flushdns
2025-02-10 00:32:12 -08:00

14 lines
271 B
Bash

#!/bin/bash
# Check if the script is run as root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as sudo. Please try again with sudo"
exit 1
fi
# Flush DNS cache
dscacheutil -flushcache
killall -HUP mDNSResponder
echo "DNS cache flushed, probably..."