Search squid archive

Start squid using launchd on Mac OS X

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux