chore(osx): add commands to check the dns

This commit is contained in:
Michele Cereda
2024-04-28 21:09:45 +02:00
parent c878f56563
commit a89e198221
2 changed files with 16 additions and 2 deletions

View File

@@ -1,5 +1,9 @@
#!sh
# Set the host's name.
scutil --set 'ComputerName' "$(defaults read '/Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName')"
scutil --set 'HostName' "$(defaults read '/Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName')"
scutil --set 'LocalHostName' "$(defaults read '/Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName')"
# Clear the DNS cache.
sudo dscacheutil -flushcache; sudo killall -HUP 'mDNSResponder'