mirror of
https://github.com/Chewbaccalakis/random.git
synced 2026-11-03 19:44:01 -08:00
Update flushdns
This commit is contained in:
1 parent
44271657a0
commit
60f8bafead
1 file changed
+13
-1
@@ -1 +1,13 @@
|
||||
dscacheutil -flushcache; sudo killall -HUP mDNSResponder
|
||||
#!/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..."
|
||||
Reference in new issue
Block a user