On Nov 24, 2006, at 11:57, Mark Duling wrote:
James Risner wrote:
I have installed squid using Darwinports and installed the plist
file:
/opt/local/etc/LaunchDaemons/org.macports.Squid/
org.macports.Squid.plist
But it doesn't start the server properly:
unix% ps ugxaww | grep -i squid
root 35 0.0 -0.0 27832 328 ?? Ss Wed07AM 0:00.01
/opt/local/bin/daemondo --label=Squid --start-cmd
/opt/local/etc/LaunchDaemons/org.macports.Squid/Squid.wrapper start ;
--stop-cmd /opt/local/etc/LaunchDaemons/org.macports.Squid/
Squid.wrapper
stop ; --restart-cmd
/opt/local/etc/LaunchDaemons/org.macports.Squid/Squid.wrapper
restart ;
--pid=none
No squid process ever starts. I can (and do) start it by hand
with "sudo
/opt/local/sbin/squid"
because I need a local cache. But I haven't been able to find
anything
on this list or in google
about how to fix it not starting from launchd. Does anyone have any
hints for me?
Surely the "tsu" command is a typo and "su" was meant in the
startupitems
section of the portfile. But in general, to trouble shoot problems
like
this, try doing manually the steps the portfile defines and see
where the
problem is.
cd to /opt/local/var/squid
Is /opt/local/var/squid/cache/00 present? then
tsu -fm squid -c "exec /opt/local/sbin/squid -s -z"
else
su -fm squid -c "exec /opt/local/sbin/squid -s"
If tsu is a type then the portfile startupitems section can be
corrected
so let us know. Or until then, correct that error in the wrapper file
generated from the portfile.
Mark
startupitem.start \
"cd ${prefix}/var/squid" \
"if \[ ! -d \"${prefix}/var/squid/cache/00\" \]; then" \
"\tsu -fm squid -c \"exec ${prefix}/sbin/squid -s -z\"" \
"fi" \
"su -fm squid -c \"exec ${prefix}/sbin/squid -s\""
startupitem.stop \
"cd ${prefix}/var/squid" \
"su -fm squid -c \"exec ${prefix}/sbin/squid -k kill\""
It doesn't say "tsu"; it says "\tsu". Presumably "\t" is meant to be
a tab character. If that is valid in TCL (I don't know if it is) then
there is no typo.
_______________________________________________
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/macports-users