- create the plist file in
~/Library/LaunchAgents/com.squid-cache.org.daemon.plist
- create a local state directory
mkdir -p ${HOME}/.local/state/squid
- do check format
plutil -lint ~/Library/LaunchAgents/com.squid-cache.org.daemon.plist
- Then load the job with
launchctl load ~/Library/LaunchAgents/com.squid-cache.org.daemon.plist
- You should see the PID number
xxxxx
and not-
when launchedlaunchctl list | grep squid # xxxxx 0 com.squid-cache.org.daemon.plist
Last active
March 26, 2025 08:03
-
-
Save randria/567c1717e6b8f8c4c36f3a3fb8362c0a to your computer and use it in GitHub Desktop.
squid with launchd
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.squid-cache.org.daemon.plist</string> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>StandardErrorPath</key> | |
<string>/Users/randriat/.local/state/squid/stderr.log</string> | |
<key>StandardOutPath</key> | |
<string>/Users/randriat/.local/state/squid/stdout.log</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/opt/homebrew/sbin/squid</string> | |
<string>--foreground</string> | |
<string>-d 5</string> | |
<string>-YC</string> | |
</array> | |
<key>OnDemand</key> | |
<false/> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Error: Bootstrap failed
is the most misunderstood error in launchd. If you search for it online, you will find many reports where people claim "this error means ..." and "doing ... will fix it", but neither is true. This error just means that there was an I/O error while trying to bootstrap the service. Basically, any I/O error will trigger this message, so it means absolutely nothing in particular, as there are many reasons and causes.
Here is a non-exhaustive list of possible causes:
launchctl
failed to communicate with launchd via IPC for some reason.launchd
returns an I/O error via IPC.source