2015-06-15 20:29:14 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2015-03-26 18:10:32 +00:00
|
|
|
OS=$(uname -s)
|
|
|
|
REL=$(uname -r)
|
|
|
|
|
|
|
|
function sorry()
|
|
|
|
{
|
|
|
|
echo "Sorry. I do not know how to flush the DNS on this OS."
|
|
|
|
echo "Once you find out, edit $(readlink ${0})."
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
case ${OS} in
|
|
|
|
Darwin) case ${REL} in
|
2015-05-09 15:51:21 +01:00
|
|
|
14.*) sudo discoveryutil udnsflushcaches
|
2015-05-18 19:51:16 +01:00
|
|
|
;;
|
|
|
|
13.*) sudo pkill mDNS
|
|
|
|
;;
|
|
|
|
*) sorry
|
|
|
|
;;
|
2015-03-26 18:10:32 +00:00
|
|
|
esac
|
|
|
|
;;
|
|
|
|
|
|
|
|
*) sorry
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|