[squid-users] Start squid using launchd on Mac OS X

From: Steve Hoelzer <shoelzer@dont-contact.us>
Date: Wed, 20 Jul 2005 12:28:07 -0500

Hi,

I'm using squid on Mac OS X 10.4. OS X includes a new program called
launchd that is supposed to replace cron, RC, xinitd, and other
methods of controlling what runs when. [1] My problem is that I can't
get it to start squid automatically at boot.

I created a minimal plist like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>com.startsquid</string>
        <key>ProgramArguments</key>
        <array>
                <string>squid</string>
                <string>-N</string>
        </array>
        <key>OnDemand</key>
        <false/>
</dict>
</plist>

And saved it as ~/Library/LaunchAgents/com.startsquid.plist

Then I load the job with
launchctl load ~/Library/LaunchAgents/com.startsquid.plist

and squid starts. If I kill squid, it gets restarted automatically.
That's just what I want. But, when I reboot, squid doesn't start. Any
ideas?

Thanks for your help,
Steve Hoelzer

------------------------------------------
Footnotes:

[1] Excellent intro to launchd:
http://www.afp548.com/article.php?story=20050620071558293
Received on Wed Jul 20 2005 - 11:28:44 MDT

This archive was generated by hypermail pre-2.1.9 : Mon Aug 01 2005 - 12:00:02 MDT