Skip to content

Instantly share code, notes, and snippets.

@davidraedev
Created April 15, 2018 18:06
Show Gist options
  • Save davidraedev/9e3a6c2ddd57ac78563cba6964a742c9 to your computer and use it in GitHub Desktop.
Save davidraedev/9e3a6c2ddd57ac78563cba6964a742c9 to your computer and use it in GitHub Desktop.
enable and disable Gatekeeper in High Sierra
#!/bin/bash
# enable and disable Gatekeeper in High Sierra
if [ "$1" = "enable" ]; then
sudo spctl --master-enable;
elif [ "$1" = "disable" ]; then
sudo spctl --master-disable;
else
echo "Enter a command 'enable|disable'";
exit;
fi;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment