Opened 6 years ago

Last modified 6 years ago

#47709 new enhancement

Squid3 Squid.wrapper suggest

Reported by: plm_macports@… Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc:
Port: squid3



I had a lot of problems to start Squid3 and don't understand why. I could start Squid directly with a "squid -s" but not with launchctl plist or directly with the wrapper.

The origin was that my configuration of "cache_dir" was in an other repertory than default. The wrapper test directly the "/opt/local/var/squid/cache" directory to test if cache directories exists…

So, I suggest to modify the "Squid.wrapper" script to test in "squid.conf" file if "cache_dir" is set to default.

A little bit like this:

if eval grep -q '^cache_dir ' /opt/local/etc/squid/squid.conf ; then
	CacheDir="$(grep '^cache_dir ' /opt/local/etc/squid/squid.conf | awk '{ print $3 }')"
	cd /opt/local/var/squid
	if [ ! -d "${CacheDir}/00" ]; then
	    /opt/local/sbin/squid -s -z
	/opt/local/sbin/squid -s

Best regards

Change History (1)

comment:1 Changed 6 years ago by ryandesign (Ryan Schmidt)

Cc: jmr removed
Milestone: MacPorts Future
Owner: changed from macports-tickets@… to jmr@…
Port: squid3 added
Type: submissionenhancement
Note: See TracTickets for help on using tickets.