Skip to content

Instantly share code, notes, and snippets.

@smashah
Created January 31, 2026 19:17
Show Gist options
  • Select an option

  • Save smashah/2c1dcf70c48532c08e62099383fdd9c9 to your computer and use it in GitHub Desktop.

Select an option

Save smashah/2c1dcf70c48532c08e62099383fdd9c9 to your computer and use it in GitHub Desktop.
Script to resurrect Little Snitch
#!/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."
@smashah
Copy link
Author

smashah commented Jan 31, 2026

Here is the corresponding script to turn off Little Snitch

https://gist.github.com/smashah/0459d9e095e24c93c6c59226d07c1d9f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment