Skip to content

Instantly share code, notes, and snippets.

@vena vena/gatekeeper
Last active Jan 14, 2017

Embed
What would you like to do?
easy dis/enabling gatekeeper in macOS 10.12. a tiny script i put in /usr/local/bin, filename "gatekeeper" so i don't have to remember spctl, just "gatekeeper on" and "gatekeeper off"
#!/bin/bash
# Allows easily dis/enabling gatekeeper
# Place in /usr/local/bin/ for easy-access,
# don't forget to chmod +x
case "$1" in
on)
sudo spctl --master-enable
sleep 0.25
sudo spctl --status
;;
off)
sudo spctl --master-disable
sleep 0.25
sudo spctl --status
;;
*)
echo $"Usage: $0 {on|off}"
exit 1
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.