Last active
January 14, 2017 18:07
-
-
Save vena/3b0eb88cd54f4a9b1782076b7a59f20b to your computer and use it in GitHub Desktop.
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"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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