Created
January 31, 2026 19:17
-
-
Save smashah/2c1dcf70c48532c08e62099383fdd9c9 to your computer and use it in GitHub Desktop.
Script to resurrect Little Snitch
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 | |
| # Define paths | |
| DAEMON_ID="system/at.obdev.littlesnitch.daemon" | |
| DAEMON_PLIST="/Library/LaunchDaemons/at.obdev.littlesnitch.daemon.plist" | |
| AGENT_PLIST="/Library/LaunchAgents/at.obdev.littlesnitch.agent.plist" | |
| USER_ID=$(id -u) | |
| echo "Starting Little Snitch..." | |
| # --- Handle System Daemon --- | |
| # Check if daemon is already loaded in launchd | |
| if sudo launchctl print "$DAEMON_ID" >/dev/null 2>&1; then | |
| echo "Daemon already loaded. Kickstarting..." | |
| sudo launchctl kickstart -k "$DAEMON_ID" | |
| else | |
| echo "Bootstrapping Daemon..." | |
| sudo launchctl bootstrap system "$DAEMON_PLIST" | |
| fi | |
| # --- Handle User Agent --- | |
| # Check if agent is already loaded | |
| if launchctl print "gui/$USER_ID/at.obdev.littlesnitch.agent" >/dev/null 2>&1; then | |
| echo "Agent already loaded. Kickstarting..." | |
| launchctl kickstart -k "gui/$USER_ID/at.obdev.littlesnitch.agent" | |
| else | |
| echo "Bootstrapping Agent..." | |
| launchctl bootstrap "gui/$USER_ID" "$AGENT_PLIST" | |
| fi | |
| echo "Little Snitch is ON." |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is the corresponding script to turn off Little Snitch
https://gist.github.com/smashah/0459d9e095e24c93c6c59226d07c1d9f