Help on startupitem.executable for Jetty server?

Guy Davis davis at guydavis.ca
Fri Sep 25 20:58:30 PDT 2009


Hi Mark,

I've attached my latest attempt as a full Portfile.  I've changed the
install location to /opt/local/share/java/jetty without the version on the
end.  (I may have to put this back to handle upgrades that don't overwrite
local config?).  I've switched to trying the 'Script' instead of the
'Excecutable' StartupItem approach, however I'm having trouble generating
the PID that launchctl seems to need.

Thanks,
Guy

On Fri, Sep 25, 2009 at 6:40 PM, Mark Duling <mark.duling at gmail.com> wrote:

> Hello Guy,
> There may be a path problem.  Always check the system.log for this type of
> thing.  'tail /var/log/system.log'.  I pasted your startupitem information
> into the current jetty portfile and I saw this in the system.log after
> running launchctl:
>
> Unable to access jarfile /opt/local/share/java/jetty/start.jar
>
> Unless you are updating the path in your updated portfile, I see the path
> as /opt/local/share/java/jetty-xxx/start.jar.
>
> Mark
>
>
> On Fri, Sep 25, 2009 at 3:03 PM, Guy Davis <davis at guydavis.ca> wrote:
>
>> Hi,
>>
>> I'm trying to update the Jetty portfile to the latest release and am
>> trying to use the 'startupitem.executable' directive to have it start
>> automatically on boot.  I've read through the MacPorts guide, but am not
>> having much luck so far.  I have Jetty 6.1.21 installing into
>> /opt/local/share/java/jetty.  It can be started manually with a 'java -jar
>> start.jar' in that directory.
>>
>> However, my attempt at startupitem seems wrong:
>>
>> startupitem.create      yes
>> startupitem.logfile     ${prefix}/share/java/jetty/logs/daemon.log"
>> startupitem.logevents   yes
>> startupitem.executable  java -jar ${prefix}/share/java/jetty/start.jar
>>
>> When I install this dev port and run:
>> sudo launchctl load -w /Library/LaunchDaemons/org.macports.jetty.plist
>> then:
>> sudo launchctl start jetty
>> I get: launchctl start error: No such proces
>>
>> Anyhow, I'd really appreciate some tips on how to properly configure Jetty
>> to launch automatically.
>>
>> Thanks in advance,
>> Guy
>>
>>
>> _______________________________________________
>> macports-dev mailing list
>> macports-dev at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20090925/cd6caf98/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Portfile
Type: application/octet-stream
Size: 1802 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20090925/cd6caf98/attachment-0001.obj>


More information about the macports-dev mailing list