Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to handle 10.11 and 10.12 with SIP #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions disablebonjour/disablebonjour.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

if [[ $(sw_vers) ]]
then
# MAKES SURE WE ARE RUNNING 10.6 -> 10.9 or 10.10.4+
# MAKES SURE WE ARE RUNNING 10.6 -> 10.9 or 10.10.4+ -> 10.11 or 10.12
if [[ $(sw_vers -productVersion | grep '10.[6-9]') ]] || [[ $(sw_vers -productVersion | grep '10.10.[4-5]') ]]
then
# CHECKS FOR FLAG IN CURRENT PLIST FILE
Expand All @@ -39,7 +39,21 @@ then
fi
exit
else
echo "OS X 10.10 NOT DETECTED, NO CHANGES HAVE BEEN MADE"
echo "OS X 10.10 NOT DETECTED, NO CHANGES HAVE BEEN MADE YET"
echo "CHECKING FOR OS X 10.11 to 10.12.2"
if [[ $(sw_vers -productVersion | grep '10.1[1-2]') ]]
then
# CHECKS FOR FLAG IN CURRENT PLIST FILE
if [[ $(defaults read /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements) == 1 ]]
then
echo "MULTICAST DISABLED, NO CHANGES MADE"
else
sudo defaults write /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements -bool YES
echo "MULTICAST DISABLED (OSX 10.11 or 10.12), PLEASE REBOOT"
fi
exit
fi
exit
fi
fi

Expand Down